linux/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <[email protected]>
 */

#include <drm/drm_crtc.h>
#include <drm/drm_flip_work.h>
#include <drm/drm_managed.h>
#include <drm/drm_mode.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>

#include "mdp4_kms.h"
#include "msm_gem.h"

struct mdp4_crtc {};
#define to_mdp4_crtc(x)

static struct mdp4_kms *get_kms(struct drm_crtc *crtc)
{}

static void request_pending(struct drm_crtc *crtc, uint32_t pending)
{}

static void crtc_flush(struct drm_crtc *crtc)
{}

/* if file!=NULL, this is preclose potential cancel-flip path */
static void complete_flip(struct drm_crtc *crtc, struct drm_file *file)
{}

static void unref_cursor_worker(struct drm_flip_work *work, void *val)
{}

/* statically (for now) map planes to mixer stage (z-order): */
static const int idxs[] =;

/* setup mixer config, for which we need to consider all crtc's and
 * the planes attached to them
 *
 * TODO may possibly need some extra locking here
 */
static void setup_mixer(struct mdp4_kms *mdp4_kms)
{}

static void blend_setup(struct drm_crtc *crtc)
{}

static void mdp4_crtc_mode_set_nofb(struct drm_crtc *crtc)
{}

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

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

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

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

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

#define CURSOR_WIDTH
#define CURSOR_HEIGHT

/* called from IRQ to update cursor related registers (if needed).  The
 * cursor registers, other than x/y position, appear not to be double
 * buffered, and changing them other than from vblank seems to trigger
 * underflow.
 */
static void update_cursor(struct drm_crtc *crtc)
{}

static int mdp4_crtc_cursor_set(struct drm_crtc *crtc,
		struct drm_file *file_priv, uint32_t handle,
		uint32_t width, uint32_t height)
{}

static int mdp4_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
{}

static const struct drm_crtc_funcs mdp4_crtc_funcs =;

static const struct drm_crtc_helper_funcs mdp4_crtc_helper_funcs =;

static void mdp4_crtc_vblank_irq(struct mdp_irq *irq, uint32_t irqstatus)
{}

static void mdp4_crtc_err_irq(struct mdp_irq *irq, uint32_t irqstatus)
{}

static void mdp4_crtc_wait_for_flush_done(struct drm_crtc *crtc)
{}

uint32_t mdp4_crtc_vblank(struct drm_crtc *crtc)
{}

/* set dma config, ie. the format the encoder wants. */
void mdp4_crtc_set_config(struct drm_crtc *crtc, uint32_t config)
{}

/* set interface for routing crtc->encoder: */
void mdp4_crtc_set_intf(struct drm_crtc *crtc, enum mdp4_intf intf, int mixer)
{}

void mdp4_crtc_wait_for_commit_done(struct drm_crtc *crtc)
{}

static const char *dma_names[] =;

static void mdp4_crtc_flip_cleanup(struct drm_device *dev, void *ptr)
{}

/* initialize crtc */
struct drm_crtc *mdp4_crtc_init(struct drm_device *dev,
		struct drm_plane *plane, int id, int ovlp_id,
		enum mdp4_dma dma_id)
{}