#include <drm/drm_atomic.h>
#include <drm/drm_damage_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_atomic_helper.h>
#include "mdp4_kms.h"
#define DOWN_SCALE_MAX …
#define UP_SCALE_MAX …
struct mdp4_plane { … };
#define to_mdp4_plane(x) …
static inline
enum mdp4_frame_format mdp4_get_frame_format(struct drm_framebuffer *fb)
{ … }
static void mdp4_plane_set_scanout(struct drm_plane *plane,
struct drm_framebuffer *fb);
static int mdp4_plane_mode_set(struct drm_plane *plane,
struct drm_crtc *crtc, struct drm_framebuffer *fb,
int crtc_x, int crtc_y,
unsigned int crtc_w, unsigned int crtc_h,
uint32_t src_x, uint32_t src_y,
uint32_t src_w, uint32_t src_h);
static struct mdp4_kms *get_kms(struct drm_plane *plane)
{ … }
static void mdp4_plane_install_properties(struct drm_plane *plane,
struct drm_mode_object *obj)
{ … }
static int mdp4_plane_set_property(struct drm_plane *plane,
struct drm_property *property, uint64_t val)
{ … }
static const struct drm_plane_funcs mdp4_plane_funcs = …;
static int mdp4_plane_prepare_fb(struct drm_plane *plane,
struct drm_plane_state *new_state)
{ … }
static void mdp4_plane_cleanup_fb(struct drm_plane *plane,
struct drm_plane_state *old_state)
{ … }
static int mdp4_plane_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void mdp4_plane_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static const struct drm_plane_helper_funcs mdp4_plane_helper_funcs = …;
static void mdp4_plane_set_scanout(struct drm_plane *plane,
struct drm_framebuffer *fb)
{ … }
static void mdp4_write_csc_config(struct mdp4_kms *mdp4_kms,
enum mdp4_pipe pipe, struct csc_cfg *csc)
{ … }
#define MDP4_VG_PHASE_STEP_DEFAULT …
static int mdp4_plane_mode_set(struct drm_plane *plane,
struct drm_crtc *crtc, struct drm_framebuffer *fb,
int crtc_x, int crtc_y,
unsigned int crtc_w, unsigned int crtc_h,
uint32_t src_x, uint32_t src_y,
uint32_t src_w, uint32_t src_h)
{ … }
static const char *pipe_names[] = …;
enum mdp4_pipe mdp4_plane_pipe(struct drm_plane *plane)
{ … }
static const uint64_t supported_format_modifiers[] = …;
static const uint32_t mdp4_rgb_formats[] = …;
static const uint32_t mdp4_rgb_yuv_formats[] = …;
struct drm_plane *mdp4_plane_init(struct drm_device *dev,
enum mdp4_pipe pipe_id, bool private_plane)
{ … }