#include <linux/clk.h>
#include <linux/component.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <video/imx-ipu-v3.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_managed.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>
#include "imx-drm.h"
#include "ipuv3-plane.h"
#define DRIVER_DESC …
struct ipu_crtc { … };
static inline struct ipu_crtc *to_ipu_crtc(struct drm_crtc *crtc)
{ … }
static void ipu_crtc_atomic_enable(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void ipu_crtc_disable_planes(struct ipu_crtc *ipu_crtc,
struct drm_crtc_state *old_crtc_state)
{ … }
static void ipu_crtc_atomic_disable(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void imx_drm_crtc_reset(struct drm_crtc *crtc)
{ … }
static struct drm_crtc_state *imx_drm_crtc_duplicate_state(struct drm_crtc *crtc)
{ … }
static void imx_drm_crtc_destroy_state(struct drm_crtc *crtc,
struct drm_crtc_state *state)
{ … }
static int ipu_enable_vblank(struct drm_crtc *crtc)
{ … }
static void ipu_disable_vblank(struct drm_crtc *crtc)
{ … }
static const struct drm_crtc_funcs ipu_crtc_funcs = …;
static irqreturn_t ipu_irq_handler(int irq, void *dev_id)
{ … }
static bool ipu_crtc_mode_fixup(struct drm_crtc *crtc,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{ … }
static int ipu_crtc_atomic_check(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void ipu_crtc_atomic_begin(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void ipu_crtc_atomic_flush(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void ipu_crtc_mode_set_nofb(struct drm_crtc *crtc)
{ … }
static const struct drm_crtc_helper_funcs ipu_helper_funcs = …;
static void ipu_put_resources(struct drm_device *dev, void *ptr)
{ … }
static int ipu_get_resources(struct drm_device *dev, struct ipu_crtc *ipu_crtc,
struct ipu_client_platformdata *pdata)
{ … }
static int ipu_drm_bind(struct device *dev, struct device *master, void *data)
{ … }
static const struct component_ops ipu_crtc_ops = …;
static int ipu_drm_probe(struct platform_device *pdev)
{ … }
static void ipu_drm_remove(struct platform_device *pdev)
{ … }
struct platform_driver ipu_drm_driver = …;