linux/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * R-Car Display Unit CRTCs
 *
 * Copyright (C) 2013-2015 Renesas Electronics Corporation
 *
 * Contact: Laurent Pinchart ([email protected])
 */

#include <linux/clk.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>

#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_crtc.h>
#include <drm/drm_device.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_vblank.h>

#include "rcar_cmm.h"
#include "rcar_du_crtc.h"
#include "rcar_du_drv.h"
#include "rcar_du_encoder.h"
#include "rcar_du_kms.h"
#include "rcar_du_plane.h"
#include "rcar_du_regs.h"
#include "rcar_du_vsp.h"
#include "rcar_lvds.h"
#include "rcar_mipi_dsi.h"

static u32 rcar_du_crtc_read(struct rcar_du_crtc *rcrtc, u32 reg)
{}

static void rcar_du_crtc_write(struct rcar_du_crtc *rcrtc, u32 reg, u32 data)
{}

static void rcar_du_crtc_clr(struct rcar_du_crtc *rcrtc, u32 reg, u32 clr)
{}

static void rcar_du_crtc_set(struct rcar_du_crtc *rcrtc, u32 reg, u32 set)
{}

void rcar_du_crtc_dsysr_clr_set(struct rcar_du_crtc *rcrtc, u32 clr, u32 set)
{}

/* -----------------------------------------------------------------------------
 * Hardware Setup
 */

struct dpll_info {};

static void rcar_du_dpll_divider(struct rcar_du_crtc *rcrtc,
				 struct dpll_info *dpll,
				 unsigned long input,
				 unsigned long target)
{}

struct du_clk_params {};

static void rcar_du_escr_divider(struct clk *clk, unsigned long target,
				 u32 escr, struct du_clk_params *params)
{}

static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc)
{}

static unsigned int plane_zpos(struct rcar_du_plane *plane)
{}

static const struct rcar_du_format_info *
plane_format(struct rcar_du_plane *plane)
{}

static void rcar_du_crtc_update_planes(struct rcar_du_crtc *rcrtc)
{}

/* -----------------------------------------------------------------------------
 * Page Flip
 */

void rcar_du_crtc_finish_page_flip(struct rcar_du_crtc *rcrtc)
{}

static bool rcar_du_crtc_page_flip_pending(struct rcar_du_crtc *rcrtc)
{}

static void rcar_du_crtc_wait_page_flip(struct rcar_du_crtc *rcrtc)
{}

/* -----------------------------------------------------------------------------
 * Color Management Module (CMM)
 */

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

static void rcar_du_cmm_setup(struct drm_crtc *crtc)
{}

/* -----------------------------------------------------------------------------
 * Start/Stop and Suspend/Resume
 */

static void rcar_du_crtc_setup(struct rcar_du_crtc *rcrtc)
{}

static int rcar_du_crtc_get(struct rcar_du_crtc *rcrtc)
{}

static void rcar_du_crtc_put(struct rcar_du_crtc *rcrtc)
{}

static void rcar_du_crtc_start(struct rcar_du_crtc *rcrtc)
{}

static void rcar_du_crtc_disable_planes(struct rcar_du_crtc *rcrtc)
{}

static void rcar_du_crtc_stop(struct rcar_du_crtc *rcrtc)
{}

/* -----------------------------------------------------------------------------
 * CRTC Functions
 */

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

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

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

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

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

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

static const struct drm_crtc_helper_funcs crtc_helper_funcs =;

static void rcar_du_crtc_crc_init(struct rcar_du_crtc *rcrtc)
{}

static void rcar_du_crtc_crc_cleanup(struct rcar_du_crtc *rcrtc)
{}

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

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

static void rcar_du_crtc_cleanup(struct drm_crtc *crtc)
{}

static void rcar_du_crtc_reset(struct drm_crtc *crtc)
{}

static int rcar_du_crtc_enable_vblank(struct drm_crtc *crtc)
{}

static void rcar_du_crtc_disable_vblank(struct drm_crtc *crtc)
{}

static int rcar_du_crtc_parse_crc_source(struct rcar_du_crtc *rcrtc,
					 const char *source_name,
					 enum vsp1_du_crc_source *source)
{}

static int rcar_du_crtc_verify_crc_source(struct drm_crtc *crtc,
					  const char *source_name,
					  size_t *values_cnt)
{}

static const char *const *
rcar_du_crtc_get_crc_sources(struct drm_crtc *crtc, size_t *count)
{}

static int rcar_du_crtc_set_crc_source(struct drm_crtc *crtc,
				       const char *source_name)
{}

static const struct drm_crtc_funcs crtc_funcs_gen2 =;

static const struct drm_crtc_funcs crtc_funcs_gen3 =;

/* -----------------------------------------------------------------------------
 * Interrupt Handling
 */

static irqreturn_t rcar_du_crtc_irq(int irq, void *arg)
{}

/* -----------------------------------------------------------------------------
 * Initialization
 */

int rcar_du_crtc_create(struct rcar_du_group *rgrp, unsigned int swindex,
			unsigned int hwindex)
{}