#include <linux/clk.h>
#include <linux/sort.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>
#include "vc4_drv.h"
#include "vc4_regs.h"
struct vc4_ctm_state { … };
#define to_vc4_ctm_state(_state) …
struct vc4_load_tracker_state { … };
#define to_vc4_load_tracker_state(_state) …
static struct vc4_ctm_state *vc4_get_ctm_state(struct drm_atomic_state *state,
struct drm_private_obj *manager)
{ … }
static struct drm_private_state *
vc4_ctm_duplicate_state(struct drm_private_obj *obj)
{ … }
static void vc4_ctm_destroy_state(struct drm_private_obj *obj,
struct drm_private_state *state)
{ … }
static const struct drm_private_state_funcs vc4_ctm_state_funcs = …;
static void vc4_ctm_obj_fini(struct drm_device *dev, void *unused)
{ … }
static int vc4_ctm_obj_init(struct vc4_dev *vc4)
{ … }
static u16 vc4_ctm_s31_32_to_s0_9(u64 in)
{ … }
static void
vc4_ctm_commit(struct vc4_dev *vc4, struct drm_atomic_state *state)
{ … }
struct vc4_hvs_state *
vc4_hvs_get_new_global_state(const struct drm_atomic_state *state)
{ … }
struct vc4_hvs_state *
vc4_hvs_get_old_global_state(const struct drm_atomic_state *state)
{ … }
struct vc4_hvs_state *
vc4_hvs_get_global_state(struct drm_atomic_state *state)
{ … }
static void vc4_hvs_pv_muxing_commit(struct vc4_dev *vc4,
struct drm_atomic_state *state)
{ … }
static void vc5_hvs_pv_muxing_commit(struct vc4_dev *vc4,
struct drm_atomic_state *state)
{ … }
static void vc4_atomic_commit_tail(struct drm_atomic_state *state)
{ … }
static int vc4_atomic_commit_setup(struct drm_atomic_state *state)
{ … }
static struct drm_framebuffer *vc4_fb_create(struct drm_device *dev,
struct drm_file *file_priv,
const struct drm_mode_fb_cmd2 *mode_cmd)
{ … }
static int
vc4_ctm_atomic_check(struct drm_device *dev, struct drm_atomic_state *state)
{ … }
static int vc4_load_tracker_atomic_check(struct drm_atomic_state *state)
{ … }
static struct drm_private_state *
vc4_load_tracker_duplicate_state(struct drm_private_obj *obj)
{ … }
static void vc4_load_tracker_destroy_state(struct drm_private_obj *obj,
struct drm_private_state *state)
{ … }
static const struct drm_private_state_funcs vc4_load_tracker_state_funcs = …;
static void vc4_load_tracker_obj_fini(struct drm_device *dev, void *unused)
{ … }
static int vc4_load_tracker_obj_init(struct vc4_dev *vc4)
{ … }
static struct drm_private_state *
vc4_hvs_channels_duplicate_state(struct drm_private_obj *obj)
{ … }
static void vc4_hvs_channels_destroy_state(struct drm_private_obj *obj,
struct drm_private_state *state)
{ … }
static void vc4_hvs_channels_print_state(struct drm_printer *p,
const struct drm_private_state *state)
{ … }
static const struct drm_private_state_funcs vc4_hvs_state_funcs = …;
static void vc4_hvs_channels_obj_fini(struct drm_device *dev, void *unused)
{ … }
static int vc4_hvs_channels_obj_init(struct vc4_dev *vc4)
{ … }
static int cmp_vc4_crtc_hvs_output(const void *a, const void *b)
{ … }
static int vc4_pv_muxing_atomic_check(struct drm_device *dev,
struct drm_atomic_state *state)
{ … }
static int
vc4_core_clock_atomic_check(struct drm_atomic_state *state)
{ … }
static int
vc4_atomic_check(struct drm_device *dev, struct drm_atomic_state *state)
{ … }
static struct drm_mode_config_helper_funcs vc4_mode_config_helpers = …;
static const struct drm_mode_config_funcs vc4_mode_funcs = …;
static const struct drm_mode_config_funcs vc5_mode_funcs = …;
int vc4_kms_load(struct drm_device *dev)
{ … }