linux/drivers/gpu/drm/arm/malidp_crtc.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * (C) COPYRIGHT 2016 ARM Limited. All rights reserved.
 * Author: Liviu Dudau <[email protected]>
 *
 * ARM Mali DP500/DP550/DP650 driver (crtc operations)
 */

#include <linux/clk.h>
#include <linux/pm_runtime.h>

#include <video/videomode.h>

#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>

#include "malidp_drv.h"
#include "malidp_hw.h"

static enum drm_mode_status malidp_crtc_mode_valid(struct drm_crtc *crtc,
						   const struct drm_display_mode *mode)
{}

static void malidp_crtc_atomic_enable(struct drm_crtc *crtc,
				      struct drm_atomic_state *state)
{}

static void malidp_crtc_atomic_disable(struct drm_crtc *crtc,
				       struct drm_atomic_state *state)
{}

static const struct gamma_curve_segment {} segments[MALIDP_COEFFTAB_NUM_COEFFS] =;

#define DE_COEFTAB_DATA(a, b)

static void malidp_generate_gamma_table(struct drm_property_blob *lut_blob,
					u32 coeffs[MALIDP_COEFFTAB_NUM_COEFFS])
{}

/*
 * Check if there is a new gamma LUT and if it is of an acceptable size. Also,
 * reject any LUTs that use distinct red, green, and blue curves.
 */
static int malidp_crtc_atomic_check_gamma(struct drm_crtc *crtc,
					  struct drm_crtc_state *state)
{}

/*
 * Check if there is a new CTM and if it contains valid input. Valid here means
 * that the number is inside the representable range for a Q3.12 number,
 * excluding truncating the fractional part of the input data.
 *
 * The COLORADJ registers can be changed atomically.
 */
static int malidp_crtc_atomic_check_ctm(struct drm_crtc *crtc,
					struct drm_crtc_state *state)
{}

static int malidp_crtc_atomic_check_scaling(struct drm_crtc *crtc,
					    struct drm_crtc_state *state)
{}

static int malidp_crtc_atomic_check(struct drm_crtc *crtc,
				    struct drm_atomic_state *state)
{}

static const struct drm_crtc_helper_funcs malidp_crtc_helper_funcs =;

static struct drm_crtc_state *malidp_crtc_duplicate_state(struct drm_crtc *crtc)
{}

static void malidp_crtc_destroy_state(struct drm_crtc *crtc,
				      struct drm_crtc_state *state)
{}

static void malidp_crtc_reset(struct drm_crtc *crtc)
{}

static int malidp_crtc_enable_vblank(struct drm_crtc *crtc)
{}

static void malidp_crtc_disable_vblank(struct drm_crtc *crtc)
{}

static const struct drm_crtc_funcs malidp_crtc_funcs =;

int malidp_crtc_init(struct drm_device *drm)
{}