#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/media-bus-format.h>
#include <linux/pm_runtime.h>
#include <linux/spinlock.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_color_mgmt.h>
#include <drm/drm_connector.h>
#include <drm/drm_crtc.h>
#include <drm/drm_encoder.h>
#include <drm/drm_fb_dma_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_plane.h>
#include <drm/drm_vblank.h>
#include "lcdif_drv.h"
#include "lcdif_regs.h"
struct lcdif_crtc_state { … };
static inline struct lcdif_crtc_state *
to_lcdif_crtc_state(struct drm_crtc_state *s)
{ … }
static const u32 lcdif_yuv2rgb_coeffs[3][2][6] = …;
static void lcdif_set_formats(struct lcdif_drm_private *lcdif,
struct drm_plane_state *plane_state,
const u32 bus_format)
{ … }
static void lcdif_set_mode(struct lcdif_drm_private *lcdif, u32 bus_flags)
{ … }
static void lcdif_enable_controller(struct lcdif_drm_private *lcdif)
{ … }
static void lcdif_disable_controller(struct lcdif_drm_private *lcdif)
{ … }
static void lcdif_reset_block(struct lcdif_drm_private *lcdif)
{ … }
static void lcdif_crtc_mode_set_nofb(struct drm_crtc_state *crtc_state,
struct drm_plane_state *plane_state)
{ … }
static int lcdif_crtc_atomic_check(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void lcdif_crtc_atomic_flush(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void lcdif_crtc_atomic_enable(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void lcdif_crtc_atomic_disable(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void lcdif_crtc_atomic_destroy_state(struct drm_crtc *crtc,
struct drm_crtc_state *state)
{ … }
static void lcdif_crtc_reset(struct drm_crtc *crtc)
{ … }
static struct drm_crtc_state *
lcdif_crtc_atomic_duplicate_state(struct drm_crtc *crtc)
{ … }
static int lcdif_crtc_enable_vblank(struct drm_crtc *crtc)
{ … }
static void lcdif_crtc_disable_vblank(struct drm_crtc *crtc)
{ … }
static const struct drm_crtc_helper_funcs lcdif_crtc_helper_funcs = …;
static const struct drm_crtc_funcs lcdif_crtc_funcs = …;
static int lcdif_plane_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void lcdif_plane_primary_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static bool lcdif_format_mod_supported(struct drm_plane *plane,
uint32_t format,
uint64_t modifier)
{ … }
static const struct drm_plane_helper_funcs lcdif_plane_primary_helper_funcs = …;
static const struct drm_plane_funcs lcdif_plane_funcs = …;
static const u32 lcdif_primary_plane_formats[] = …;
static const u64 lcdif_modifiers[] = …;
int lcdif_kms_init(struct lcdif_drm_private *lcdif)
{ … }