#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_atomic_uapi.h>
#include <drm/drm_blend.h>
#include <drm/drm_drv.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 "uapi/drm/vc4_drm.h"
#include "vc4_drv.h"
#include "vc4_regs.h"
static const struct hvs_format { … } hvs_formats[] = …;
static const struct hvs_format *vc4_get_hvs_format(u32 drm_format)
{ … }
static enum vc4_scaling_mode vc4_get_scaling_mode(u32 src, u32 dst)
{ … }
static bool plane_enabled(struct drm_plane_state *state)
{ … }
static struct drm_plane_state *vc4_plane_duplicate_state(struct drm_plane *plane)
{ … }
static void vc4_plane_destroy_state(struct drm_plane *plane,
struct drm_plane_state *state)
{ … }
static void vc4_plane_reset(struct drm_plane *plane)
{ … }
static void vc4_dlist_counter_increment(struct vc4_plane_state *vc4_state)
{ … }
static void vc4_dlist_write(struct vc4_plane_state *vc4_state, u32 val)
{ … }
static u32 vc4_get_scl_field(struct drm_plane_state *state, int plane)
{ … }
static int vc4_plane_margins_adj(struct drm_plane_state *pstate)
{ … }
static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state)
{ … }
static void vc4_write_tpz(struct vc4_plane_state *vc4_state, u32 src, u32 dst)
{ … }
static void vc4_write_ppf(struct vc4_plane_state *vc4_state, u32 src, u32 dst)
{ … }
static u32 vc4_lbm_size(struct drm_plane_state *state)
{ … }
static void vc4_write_scaling_parameters(struct drm_plane_state *state,
int channel)
{ … }
static void vc4_plane_calc_load(struct drm_plane_state *state)
{ … }
static int vc4_plane_allocate_lbm(struct drm_plane_state *state)
{ … }
static const u32 colorspace_coeffs[2][DRM_COLOR_ENCODING_MAX][3] = …;
static u32 vc4_hvs4_get_alpha_blend_mode(struct drm_plane_state *state)
{ … }
static u32 vc4_hvs5_get_alpha_blend_mode(struct drm_plane_state *state)
{ … }
static int vc4_plane_mode_set(struct drm_plane *plane,
struct drm_plane_state *state)
{ … }
static int vc4_plane_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void vc4_plane_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
u32 vc4_plane_write_dlist(struct drm_plane *plane, u32 __iomem *dlist)
{ … }
u32 vc4_plane_dlist_size(const struct drm_plane_state *state)
{ … }
void vc4_plane_async_set_fb(struct drm_plane *plane, struct drm_framebuffer *fb)
{ … }
static void vc4_plane_atomic_async_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static int vc4_plane_atomic_async_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static int vc4_prepare_fb(struct drm_plane *plane,
struct drm_plane_state *state)
{ … }
static void vc4_cleanup_fb(struct drm_plane *plane,
struct drm_plane_state *state)
{ … }
static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = …;
static const struct drm_plane_helper_funcs vc5_plane_helper_funcs = …;
static bool vc4_format_mod_supported(struct drm_plane *plane,
uint32_t format,
uint64_t modifier)
{ … }
static const struct drm_plane_funcs vc4_plane_funcs = …;
struct drm_plane *vc4_plane_init(struct drm_device *dev,
enum drm_plane_type type,
uint32_t possible_crtcs)
{ … }
#define VC4_NUM_OVERLAY_PLANES …
int vc4_plane_create_additional_planes(struct drm_device *drm)
{ … }