#include <linux/clk.h>
#include <linux/of.h>
#include <linux/pm_runtime.h>
#include <linux/spinlock.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_print.h>
#include <drm/drm_vblank.h>
#include <drm/drm_simple_kms_helper.h>
#include <drm/drm_bridge.h>
#include "komeda_dev.h"
#include "komeda_kms.h"
void komeda_crtc_get_color_config(struct drm_crtc_state *crtc_st,
u32 *color_depths, u32 *color_formats)
{ … }
static void komeda_crtc_update_clock_ratio(struct komeda_crtc_state *kcrtc_st)
{ … }
static int
komeda_crtc_atomic_check(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static int
komeda_crtc_prepare(struct komeda_crtc *kcrtc)
{ … }
static int
komeda_crtc_unprepare(struct komeda_crtc *kcrtc)
{ … }
void komeda_crtc_handle_event(struct komeda_crtc *kcrtc,
struct komeda_events *evts)
{ … }
static void
komeda_crtc_do_flush(struct drm_crtc *crtc,
struct drm_crtc_state *old)
{ … }
static void
komeda_crtc_atomic_enable(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
void
komeda_crtc_flush_and_wait_for_flip_done(struct komeda_crtc *kcrtc,
struct completion *input_flip_done)
{ … }
static void
komeda_crtc_atomic_disable(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static void
komeda_crtc_atomic_flush(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{ … }
static unsigned long
komeda_calc_min_aclk_rate(struct komeda_crtc *kcrtc,
unsigned long pxlclk)
{ … }
unsigned long komeda_crtc_get_aclk(struct komeda_crtc_state *kcrtc_st)
{ … }
static enum drm_mode_status
komeda_crtc_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode *m)
{ … }
static bool komeda_crtc_mode_fixup(struct drm_crtc *crtc,
const struct drm_display_mode *m,
struct drm_display_mode *adjusted_mode)
{ … }
static const struct drm_crtc_helper_funcs komeda_crtc_helper_funcs = …;
static void komeda_crtc_reset(struct drm_crtc *crtc)
{ … }
static struct drm_crtc_state *
komeda_crtc_atomic_duplicate_state(struct drm_crtc *crtc)
{ … }
static void komeda_crtc_atomic_destroy_state(struct drm_crtc *crtc,
struct drm_crtc_state *state)
{ … }
static int komeda_crtc_vblank_enable(struct drm_crtc *crtc)
{ … }
static void komeda_crtc_vblank_disable(struct drm_crtc *crtc)
{ … }
static const struct drm_crtc_funcs komeda_crtc_funcs = …;
int komeda_kms_setup_crtcs(struct komeda_kms_dev *kms,
struct komeda_dev *mdev)
{ … }
static struct drm_plane *
get_crtc_primary(struct komeda_kms_dev *kms, struct komeda_crtc *crtc)
{ … }
static int komeda_attach_bridge(struct device *dev,
struct komeda_pipeline *pipe,
struct drm_encoder *encoder)
{ … }
static int komeda_crtc_add(struct komeda_kms_dev *kms,
struct komeda_crtc *kcrtc)
{ … }
int komeda_kms_add_crtcs(struct komeda_kms_dev *kms, struct komeda_dev *mdev)
{ … }