mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
drm/atomic: Pass the full state to planes atomic disable and update
The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's convert the remaining helpers to provide a consistent interface, this time with the planes atomic_update and atomic_disable. The conversion was done using the coccinelle script below, built tested on all the drivers. @@ identifier plane, plane_state; symbol state; @@ struct drm_plane_helper_funcs { ... void (*atomic_update)(struct drm_plane *plane, - struct drm_plane_state *plane_state); + struct drm_atomic_state *state); ... } @@ identifier plane, plane_state; symbol state; @@ struct drm_plane_helper_funcs { ... void (*atomic_disable)(struct drm_plane *plane, - struct drm_plane_state *plane_state); + struct drm_atomic_state *state); ... } @ plane_atomic_func @ identifier helpers; identifier func; @@ ( static const struct drm_plane_helper_funcs helpers = { ..., .atomic_update = func, ..., }; | static const struct drm_plane_helper_funcs helpers = { ..., .atomic_disable = func, ..., }; ) @@ struct drm_plane_helper_funcs *FUNCS; identifier f; identifier crtc_state; identifier plane, plane_state, state; expression e; @@ f(struct drm_crtc_state *crtc_state) { ... struct drm_atomic_state *state = e; <+... ( - FUNCS->atomic_disable(plane, plane_state) + FUNCS->atomic_disable(plane, state) | - FUNCS->atomic_update(plane, plane_state) + FUNCS->atomic_update(plane, state) ) ...+> } @@ identifier plane_atomic_func.func; identifier plane; symbol state; @@ func(struct drm_plane *plane, - struct drm_plane_state *state) + struct drm_plane_state *old_plane_state) { <... - state + old_plane_state ...> } @ ignores_old_state @ identifier plane_atomic_func.func; identifier plane, old_state; @@ func(struct drm_plane *plane, struct drm_plane_state *old_state) { ... when != old_state } @ adds_old_state depends on plane_atomic_func && !ignores_old_state @ identifier plane_atomic_func.func; identifier plane, plane_state; @@ func(struct drm_plane *plane, struct drm_plane_state *plane_state) { + struct drm_plane_state *plane_state = drm_atomic_get_old_plane_state(state, plane); ... } @ depends on plane_atomic_func @ identifier plane_atomic_func.func; identifier plane, plane_state; @@ func(struct drm_plane *plane, - struct drm_plane_state *plane_state + struct drm_atomic_state *state ) { ... } @ include depends on adds_old_state @ @@ #include <drm/drm_atomic.h> @ no_include depends on !include && adds_old_state @ @@ + #include <drm/drm_atomic.h> #include <drm/...> @@ identifier plane_atomic_func.func; identifier plane, state; identifier plane_state; @@ func(struct drm_plane *plane, struct drm_atomic_state *state) { ... struct drm_plane_state *plane_state = drm_atomic_get_old_plane_state(state, plane); <+... - plane_state->state + state ...+> } Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-9-maxime@cerno.tech
This commit is contained in:
parent
41016fe102
commit
977697e20b
@ -145,7 +145,7 @@ static const struct drm_crtc_helper_funcs arc_pgu_crtc_helper_funcs = {
|
||||
};
|
||||
|
||||
static void arc_pgu_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_plane_state = plane->state;
|
||||
struct arcpgu_drm_private *arcpgu;
|
||||
|
@ -116,7 +116,7 @@ komeda_plane_atomic_check(struct drm_plane *plane,
|
||||
*/
|
||||
static void
|
||||
komeda_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -260,7 +260,7 @@ static int hdlcd_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void hdlcd_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_plane_state = plane->state;
|
||||
struct drm_framebuffer *fb = new_plane_state->fb;
|
||||
|
@ -791,8 +791,10 @@ static void malidp_de_set_plane_afbc(struct drm_plane *plane)
|
||||
}
|
||||
|
||||
static void malidp_de_plane_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct malidp_plane *mp;
|
||||
struct malidp_plane_state *ms = to_malidp_plane_state(plane->state);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
@ -909,7 +911,7 @@ static void malidp_de_plane_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void malidp_de_plane_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct malidp_plane *mp = to_malidp_plane(plane);
|
||||
|
||||
|
@ -66,8 +66,10 @@ static inline u32 armada_csc(struct drm_plane_state *state)
|
||||
|
||||
/* === Plane support === */
|
||||
static void armada_drm_overlay_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct armada_crtc *dcrtc;
|
||||
struct armada_regs *regs;
|
||||
@ -214,8 +216,10 @@ static void armada_drm_overlay_plane_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void armada_drm_overlay_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct armada_crtc *dcrtc;
|
||||
struct armada_regs *regs;
|
||||
unsigned int idx = 0;
|
||||
|
@ -161,8 +161,10 @@ int armada_drm_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void armada_drm_primary_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct armada_crtc *dcrtc;
|
||||
struct armada_regs *regs;
|
||||
@ -248,8 +250,10 @@ static void armada_drm_primary_plane_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void armada_drm_primary_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct armada_crtc *dcrtc;
|
||||
struct armada_regs *regs;
|
||||
unsigned int idx = 0;
|
||||
|
@ -569,8 +569,10 @@ static int ast_primary_plane_helper_atomic_check(struct drm_plane *plane,
|
||||
|
||||
static void
|
||||
ast_primary_plane_helper_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_device *dev = plane->dev;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
@ -601,7 +603,7 @@ ast_primary_plane_helper_atomic_update(struct drm_plane *plane,
|
||||
|
||||
static void
|
||||
ast_primary_plane_helper_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct ast_private *ast = to_ast_private(plane->dev);
|
||||
|
||||
@ -790,9 +792,11 @@ static int ast_cursor_plane_helper_atomic_check(struct drm_plane *plane,
|
||||
|
||||
static void
|
||||
ast_cursor_plane_helper_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct ast_cursor_plane *ast_cursor_plane = to_ast_cursor_plane(plane);
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(new_state);
|
||||
struct drm_framebuffer *fb = new_state->fb;
|
||||
@ -860,7 +864,7 @@ ast_cursor_plane_helper_atomic_update(struct drm_plane *plane,
|
||||
|
||||
static void
|
||||
ast_cursor_plane_helper_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct ast_private *ast = to_ast_private(plane->dev);
|
||||
|
||||
|
@ -712,7 +712,7 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p,
|
||||
}
|
||||
|
||||
static void atmel_hlcdc_plane_atomic_disable(struct drm_plane *p,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p);
|
||||
|
||||
@ -731,7 +731,7 @@ static void atmel_hlcdc_plane_atomic_disable(struct drm_plane *p,
|
||||
}
|
||||
|
||||
static void atmel_hlcdc_plane_atomic_update(struct drm_plane *p,
|
||||
struct drm_plane_state *old_s)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_s = p->state;
|
||||
struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p);
|
||||
@ -743,7 +743,7 @@ static void atmel_hlcdc_plane_atomic_update(struct drm_plane *p,
|
||||
return;
|
||||
|
||||
if (!hstate->base.visible) {
|
||||
atmel_hlcdc_plane_atomic_disable(p, old_s);
|
||||
atmel_hlcdc_plane_atomic_disable(p, state);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2528,9 +2528,9 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev,
|
||||
no_disable)
|
||||
continue;
|
||||
|
||||
funcs->atomic_disable(plane, old_plane_state);
|
||||
funcs->atomic_disable(plane, old_state);
|
||||
} else if (new_plane_state->crtc || disabling) {
|
||||
funcs->atomic_update(plane, old_plane_state);
|
||||
funcs->atomic_update(plane, old_state);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2602,10 +2602,10 @@ drm_atomic_helper_commit_planes_on_crtc(struct drm_crtc_state *old_crtc_state)
|
||||
|
||||
if (drm_atomic_plane_disabling(old_plane_state, new_plane_state) &&
|
||||
plane_funcs->atomic_disable)
|
||||
plane_funcs->atomic_disable(plane, old_plane_state);
|
||||
plane_funcs->atomic_disable(plane, old_state);
|
||||
else if (new_plane_state->crtc ||
|
||||
drm_atomic_plane_disabling(old_plane_state, new_plane_state))
|
||||
plane_funcs->atomic_update(plane, old_plane_state);
|
||||
plane_funcs->atomic_update(plane, old_state);
|
||||
}
|
||||
|
||||
if (crtc_funcs && crtc_funcs->atomic_flush)
|
||||
|
@ -206,8 +206,10 @@ static int drm_simple_kms_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void drm_simple_kms_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_pstate)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_pstate = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_simple_display_pipe *pipe;
|
||||
|
||||
pipe = container_of(plane, struct drm_simple_display_pipe, plane);
|
||||
|
@ -252,7 +252,7 @@ static int exynos_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void exynos_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(new_state->crtc);
|
||||
@ -266,8 +266,9 @@ static void exynos_plane_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void exynos_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state, plane);
|
||||
struct exynos_drm_plane *exynos_plane = to_exynos_plane(plane);
|
||||
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(old_state->crtc);
|
||||
|
||||
|
@ -60,7 +60,7 @@ static int fsl_dcu_drm_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void fsl_dcu_drm_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct fsl_dcu_drm_device *fsl_dev = plane->dev->dev_private;
|
||||
unsigned int value;
|
||||
@ -76,7 +76,7 @@ static void fsl_dcu_drm_plane_atomic_disable(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void fsl_dcu_drm_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
|
||||
{
|
||||
struct fsl_dcu_drm_device *fsl_dev = plane->dev->dev_private;
|
||||
|
@ -99,7 +99,7 @@ static int hibmc_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void hibmc_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
u32 reg;
|
||||
|
@ -804,7 +804,7 @@ static int ade_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void ade_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct kirin_plane *kplane = to_kirin_plane(plane);
|
||||
@ -817,7 +817,7 @@ static void ade_plane_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void ade_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct kirin_plane *kplane = to_kirin_plane(plane);
|
||||
|
||||
|
@ -264,8 +264,10 @@ static bool dcss_plane_needs_setup(struct drm_plane_state *state,
|
||||
}
|
||||
|
||||
static void dcss_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct dcss_plane *dcss_plane = to_dcss_plane(plane);
|
||||
struct dcss_dev *dcss = plane->dev->dev_private;
|
||||
@ -346,7 +348,7 @@ static void dcss_plane_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void dcss_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct dcss_plane *dcss_plane = to_dcss_plane(plane);
|
||||
struct dcss_dev *dcss = plane->dev->dev_private;
|
||||
|
@ -494,7 +494,7 @@ static int ipu_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void ipu_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct ipu_plane *ipu_plane = to_ipu_plane(plane);
|
||||
|
||||
@ -539,8 +539,10 @@ static void ipu_calculate_bursts(u32 width, u32 cpp, u32 stride,
|
||||
}
|
||||
|
||||
static void ipu_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct ipu_plane *ipu_plane = to_ipu_plane(plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct ipu_plane_state *ipu_state = to_ipu_plane_state(new_state);
|
||||
|
@ -444,7 +444,7 @@ void ingenic_drm_plane_disable(struct device *dev, struct drm_plane *plane)
|
||||
}
|
||||
|
||||
static void ingenic_drm_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct ingenic_drm *priv = drm_device_get_priv(plane->dev);
|
||||
|
||||
@ -542,7 +542,7 @@ static void ingenic_drm_update_palette(struct ingenic_drm *priv,
|
||||
}
|
||||
|
||||
static void ingenic_drm_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *oldstate)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct ingenic_drm *priv = drm_device_get_priv(plane->dev);
|
||||
struct drm_plane_state *newstate = plane->state;
|
||||
|
@ -282,7 +282,7 @@ static inline bool osd_changed(struct drm_plane_state *state,
|
||||
}
|
||||
|
||||
static void ingenic_ipu_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *oldstate)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct ingenic_ipu *ipu = plane_to_ingenic_ipu(plane);
|
||||
struct drm_plane_state *newstate = plane->state;
|
||||
@ -595,7 +595,7 @@ static int ingenic_ipu_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void ingenic_ipu_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct ingenic_ipu *ipu = plane_to_ingenic_ipu(plane);
|
||||
|
||||
|
@ -110,7 +110,7 @@ static int kmb_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void kmb_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct kmb_plane *kmb_plane = to_kmb_plane(plane);
|
||||
int plane_id = kmb_plane->id;
|
||||
@ -278,8 +278,10 @@ static void config_csc(struct kmb_drm_private *kmb, int plane_id)
|
||||
}
|
||||
|
||||
static void kmb_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_plane_state *new_plane_state = plane->state;
|
||||
struct drm_framebuffer *fb;
|
||||
struct kmb_drm_private *kmb;
|
||||
@ -294,7 +296,7 @@ static void kmb_plane_atomic_update(struct drm_plane *plane,
|
||||
int num_planes;
|
||||
static dma_addr_t addr[MAX_SUB_PLANES];
|
||||
|
||||
if (!plane || !new_plane_state || !state)
|
||||
if (!plane || !new_plane_state || !old_plane_state)
|
||||
return;
|
||||
|
||||
fb = new_plane_state->fb;
|
||||
|
@ -506,7 +506,7 @@ int mtk_drm_crtc_plane_check(struct drm_crtc *crtc, struct drm_plane *plane,
|
||||
}
|
||||
|
||||
void mtk_drm_crtc_async_update(struct drm_crtc *crtc, struct drm_plane *plane,
|
||||
struct drm_plane_state *new_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
|
||||
const struct drm_plane_helper_funcs *plane_helper_funcs =
|
||||
@ -515,7 +515,7 @@ void mtk_drm_crtc_async_update(struct drm_crtc *crtc, struct drm_plane *plane,
|
||||
if (!mtk_crtc->enabled)
|
||||
return;
|
||||
|
||||
plane_helper_funcs->atomic_update(plane, new_state);
|
||||
plane_helper_funcs->atomic_update(plane, state);
|
||||
mtk_drm_crtc_hw_config(mtk_crtc);
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,6 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
|
||||
int mtk_drm_crtc_plane_check(struct drm_crtc *crtc, struct drm_plane *plane,
|
||||
struct mtk_plane_state *state);
|
||||
void mtk_drm_crtc_async_update(struct drm_crtc *crtc, struct drm_plane *plane,
|
||||
struct drm_plane_state *plane_state);
|
||||
struct drm_atomic_state *plane_state);
|
||||
|
||||
#endif /* MTK_DRM_CRTC_H */
|
||||
|
@ -128,7 +128,7 @@ static void mtk_plane_atomic_async_update(struct drm_plane *plane,
|
||||
swap(plane->state->fb, new_state->fb);
|
||||
new_plane_state->pending.async_dirty = true;
|
||||
|
||||
mtk_drm_crtc_async_update(new_state->crtc, plane, new_state);
|
||||
mtk_drm_crtc_async_update(new_state->crtc, plane, state);
|
||||
}
|
||||
|
||||
static const struct drm_plane_funcs mtk_plane_funcs = {
|
||||
@ -173,7 +173,7 @@ static int mtk_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void mtk_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct mtk_plane_state *mtk_plane_state = to_mtk_plane_state(new_state);
|
||||
@ -183,7 +183,7 @@ static void mtk_plane_atomic_disable(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void mtk_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct mtk_plane_state *mtk_plane_state = to_mtk_plane_state(new_state);
|
||||
@ -198,7 +198,7 @@ static void mtk_plane_atomic_update(struct drm_plane *plane,
|
||||
return;
|
||||
|
||||
if (!new_state->visible) {
|
||||
mtk_plane_atomic_disable(plane, old_state);
|
||||
mtk_plane_atomic_disable(plane, state);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -468,7 +468,7 @@ static void meson_overlay_setup_scaler_params(struct meson_drm *priv,
|
||||
}
|
||||
|
||||
static void meson_overlay_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct meson_overlay *meson_overlay = to_meson_overlay(plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
@ -721,7 +721,7 @@ static void meson_overlay_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void meson_overlay_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct meson_overlay *meson_overlay = to_meson_overlay(plane);
|
||||
struct meson_drm *priv = meson_overlay->priv;
|
||||
|
@ -130,7 +130,7 @@ static u32 meson_g12a_afbcd_line_stride(struct meson_drm *priv)
|
||||
}
|
||||
|
||||
static void meson_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct meson_plane *meson_plane = to_meson_plane(plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
@ -395,7 +395,7 @@ static void meson_plane_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void meson_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct meson_plane *meson_plane = to_meson_plane(plane);
|
||||
struct meson_drm *priv = meson_plane->priv;
|
||||
|
@ -574,7 +574,7 @@ static void dpu_crtc_atomic_flush(struct drm_crtc *crtc,
|
||||
* of those planes explicitly here prior to plane flush.
|
||||
*/
|
||||
drm_atomic_crtc_for_each_plane(plane, crtc)
|
||||
dpu_plane_restore(plane);
|
||||
dpu_plane_restore(plane, state);
|
||||
|
||||
/* update performance setting before crtc kickoff */
|
||||
dpu_core_perf_crtc_update(crtc, 1, false);
|
||||
|
@ -1241,7 +1241,7 @@ static void _dpu_plane_atomic_disable(struct drm_plane *plane)
|
||||
}
|
||||
|
||||
static void dpu_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct dpu_plane *pdpu = to_dpu_plane(plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
@ -1257,7 +1257,7 @@ static void dpu_plane_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
}
|
||||
|
||||
void dpu_plane_restore(struct drm_plane *plane)
|
||||
void dpu_plane_restore(struct drm_plane *plane, struct drm_atomic_state *state)
|
||||
{
|
||||
struct dpu_plane *pdpu;
|
||||
|
||||
@ -1270,8 +1270,7 @@ void dpu_plane_restore(struct drm_plane *plane)
|
||||
|
||||
DPU_DEBUG_PLANE(pdpu, "\n");
|
||||
|
||||
/* last plane state is same as current state */
|
||||
dpu_plane_atomic_update(plane, plane->state);
|
||||
dpu_plane_atomic_update(plane, state);
|
||||
}
|
||||
|
||||
static void dpu_plane_destroy(struct drm_plane *plane)
|
||||
|
@ -88,7 +88,7 @@ void dpu_plane_get_ctl_flush(struct drm_plane *plane, struct dpu_hw_ctl *ctl,
|
||||
* dpu_plane_restore - restore hw state if previously power collapsed
|
||||
* @plane: Pointer to drm plane structure
|
||||
*/
|
||||
void dpu_plane_restore(struct drm_plane *plane);
|
||||
void dpu_plane_restore(struct drm_plane *plane, struct drm_atomic_state *state);
|
||||
|
||||
/**
|
||||
* dpu_plane_flush - final plane operations before commit flush
|
||||
|
@ -112,7 +112,7 @@ static int mdp4_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void mdp4_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
int ret;
|
||||
|
@ -426,7 +426,7 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void mdp5_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
|
||||
|
@ -419,7 +419,7 @@ static int mxsfb_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void mxsfb_plane_primary_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_pstate)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct mxsfb_drm_private *mxsfb = to_mxsfb_drm_private(plane->dev);
|
||||
dma_addr_t paddr;
|
||||
@ -430,8 +430,10 @@ static void mxsfb_plane_primary_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void mxsfb_plane_overlay_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_pstate)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_pstate = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct mxsfb_drm_private *mxsfb = to_mxsfb_drm_private(plane->dev);
|
||||
struct drm_plane_state *new_pstate = plane->state;
|
||||
dma_addr_t paddr;
|
||||
|
@ -40,7 +40,7 @@ static void omap_plane_cleanup_fb(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void omap_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct omap_drm_private *priv = plane->dev->dev_private;
|
||||
struct omap_plane *omap_plane = to_omap_plane(plane);
|
||||
@ -87,7 +87,7 @@ static void omap_plane_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void omap_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct omap_drm_private *priv = plane->dev->dev_private;
|
||||
|
@ -632,7 +632,7 @@ static void qxl_free_cursor(struct qxl_bo *cursor_bo)
|
||||
}
|
||||
|
||||
static void qxl_primary_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct qxl_device *qdev = to_qxl(plane->dev);
|
||||
@ -664,8 +664,10 @@ static void qxl_primary_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void qxl_primary_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct qxl_device *qdev = to_qxl(plane->dev);
|
||||
|
||||
if (old_state->fb) {
|
||||
@ -681,8 +683,10 @@ static void qxl_primary_atomic_disable(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void qxl_cursor_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct qxl_device *qdev = to_qxl(plane->dev);
|
||||
struct drm_framebuffer *fb = new_state->fb;
|
||||
@ -695,8 +699,10 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void qxl_cursor_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct qxl_device *qdev = to_qxl(plane->dev);
|
||||
struct qxl_crtc *qcrtc;
|
||||
struct qxl_release *release;
|
||||
|
@ -618,8 +618,9 @@ static int rcar_du_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void rcar_du_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state, plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct rcar_du_plane *rplane = to_rcar_plane(plane);
|
||||
struct rcar_du_plane_state *old_rstate;
|
||||
|
@ -277,8 +277,9 @@ static int rcar_du_vsp_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void rcar_du_vsp_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state, plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct rcar_du_vsp_plane *rplane = to_rcar_vsp_plane(plane);
|
||||
struct rcar_du_crtc *crtc = to_rcar_crtc(old_state->crtc);
|
||||
|
@ -859,8 +859,10 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void vop_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct vop_win *vop_win = to_vop_win(plane);
|
||||
struct vop *vop = to_vop(old_state->crtc);
|
||||
|
||||
@ -875,8 +877,10 @@ static void vop_plane_atomic_disable(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void vop_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct drm_crtc *crtc = new_state->crtc;
|
||||
struct vop_win *vop_win = to_vop_win(plane);
|
||||
@ -910,7 +914,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
|
||||
return;
|
||||
|
||||
if (!new_state->visible) {
|
||||
vop_plane_atomic_disable(plane, old_state);
|
||||
vop_plane_atomic_disable(plane, state);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1078,7 +1082,7 @@ static void vop_plane_atomic_async_update(struct drm_plane *plane,
|
||||
swap(plane->state->fb, new_state->fb);
|
||||
|
||||
if (vop->is_enabled) {
|
||||
vop_plane_atomic_update(plane, plane->state);
|
||||
vop_plane_atomic_update(plane, state);
|
||||
spin_lock(&vop->reg_lock);
|
||||
vop_cfg_done(vop);
|
||||
spin_unlock(&vop->reg_lock);
|
||||
|
@ -256,7 +256,7 @@ static int sti_cursor_atomic_check(struct drm_plane *drm_plane,
|
||||
}
|
||||
|
||||
static void sti_cursor_atomic_update(struct drm_plane *drm_plane,
|
||||
struct drm_plane_state *oldstate)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *newstate = drm_plane->state;
|
||||
struct sti_plane *plane = to_sti_plane(drm_plane);
|
||||
@ -310,8 +310,10 @@ static void sti_cursor_atomic_update(struct drm_plane *drm_plane,
|
||||
}
|
||||
|
||||
static void sti_cursor_atomic_disable(struct drm_plane *drm_plane,
|
||||
struct drm_plane_state *oldstate)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *oldstate = drm_atomic_get_old_plane_state(state,
|
||||
drm_plane);
|
||||
struct sti_plane *plane = to_sti_plane(drm_plane);
|
||||
|
||||
if (!oldstate->crtc) {
|
||||
|
@ -699,8 +699,10 @@ static int sti_gdp_atomic_check(struct drm_plane *drm_plane,
|
||||
}
|
||||
|
||||
static void sti_gdp_atomic_update(struct drm_plane *drm_plane,
|
||||
struct drm_plane_state *oldstate)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *oldstate = drm_atomic_get_old_plane_state(state,
|
||||
drm_plane);
|
||||
struct drm_plane_state *newstate = drm_plane->state;
|
||||
struct sti_plane *plane = to_sti_plane(drm_plane);
|
||||
struct sti_gdp *gdp = to_sti_gdp(plane);
|
||||
@ -864,8 +866,10 @@ end:
|
||||
}
|
||||
|
||||
static void sti_gdp_atomic_disable(struct drm_plane *drm_plane,
|
||||
struct drm_plane_state *oldstate)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *oldstate = drm_atomic_get_old_plane_state(state,
|
||||
drm_plane);
|
||||
struct sti_plane *plane = to_sti_plane(drm_plane);
|
||||
|
||||
if (!oldstate->crtc) {
|
||||
|
@ -1109,8 +1109,10 @@ static int sti_hqvdp_atomic_check(struct drm_plane *drm_plane,
|
||||
}
|
||||
|
||||
static void sti_hqvdp_atomic_update(struct drm_plane *drm_plane,
|
||||
struct drm_plane_state *oldstate)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *oldstate = drm_atomic_get_old_plane_state(state,
|
||||
drm_plane);
|
||||
struct drm_plane_state *newstate = drm_plane->state;
|
||||
struct sti_plane *plane = to_sti_plane(drm_plane);
|
||||
struct sti_hqvdp *hqvdp = to_sti_hqvdp(plane);
|
||||
@ -1240,8 +1242,10 @@ static void sti_hqvdp_atomic_update(struct drm_plane *drm_plane,
|
||||
}
|
||||
|
||||
static void sti_hqvdp_atomic_disable(struct drm_plane *drm_plane,
|
||||
struct drm_plane_state *oldstate)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *oldstate = drm_atomic_get_old_plane_state(state,
|
||||
drm_plane);
|
||||
struct sti_plane *plane = to_sti_plane(drm_plane);
|
||||
|
||||
if (!oldstate->crtc) {
|
||||
|
@ -775,7 +775,7 @@ static int ltdc_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void ltdc_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *oldstate)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct ltdc_device *ldev = plane_to_ltdc(plane);
|
||||
struct drm_plane_state *newstate = plane->state;
|
||||
@ -889,8 +889,10 @@ static void ltdc_plane_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void ltdc_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *oldstate)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *oldstate = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct ltdc_device *ldev = plane_to_ltdc(plane);
|
||||
u32 lofs = plane->index * LAY_OFS;
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
* Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
*/
|
||||
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_gem_atomic_helper.h>
|
||||
#include <drm/drm_plane_helper.h>
|
||||
@ -63,8 +64,10 @@ static void sun4i_backend_layer_destroy_state(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void sun4i_backend_layer_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct sun4i_layer_state *layer_state = state_to_sun4i_layer_state(old_state);
|
||||
struct sun4i_layer *layer = plane_to_sun4i_layer(plane);
|
||||
struct sun4i_backend *backend = layer->backend;
|
||||
@ -81,7 +84,7 @@ static void sun4i_backend_layer_atomic_disable(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void sun4i_backend_layer_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct sun4i_layer_state *layer_state = state_to_sun4i_layer_state(new_state);
|
||||
|
@ -289,8 +289,10 @@ static int sun8i_ui_layer_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void sun8i_ui_layer_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct sun8i_ui_layer *layer = plane_to_sun8i_ui_layer(plane);
|
||||
unsigned int old_zpos = old_state->normalized_zpos;
|
||||
struct sun8i_mixer *mixer = layer->mixer;
|
||||
@ -300,8 +302,10 @@ static void sun8i_ui_layer_atomic_disable(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void sun8i_ui_layer_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct sun8i_ui_layer *layer = plane_to_sun8i_ui_layer(plane);
|
||||
unsigned int zpos = new_state->normalized_zpos;
|
||||
|
@ -393,8 +393,10 @@ static int sun8i_vi_layer_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void sun8i_vi_layer_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct sun8i_vi_layer *layer = plane_to_sun8i_vi_layer(plane);
|
||||
unsigned int old_zpos = old_state->normalized_zpos;
|
||||
struct sun8i_mixer *mixer = layer->mixer;
|
||||
@ -404,8 +406,10 @@ static void sun8i_vi_layer_atomic_disable(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void sun8i_vi_layer_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct sun8i_vi_layer *layer = plane_to_sun8i_vi_layer(plane);
|
||||
unsigned int zpos = new_state->normalized_zpos;
|
||||
|
@ -691,8 +691,10 @@ static int tegra_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void tegra_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct tegra_plane *p = to_tegra_plane(plane);
|
||||
u32 value;
|
||||
|
||||
@ -706,7 +708,7 @@ static void tegra_plane_atomic_disable(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void tegra_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct tegra_plane_state *tegra_plane_state = to_tegra_plane_state(new_state);
|
||||
@ -720,7 +722,7 @@ static void tegra_plane_atomic_update(struct drm_plane *plane,
|
||||
return;
|
||||
|
||||
if (!new_state->visible)
|
||||
return tegra_plane_atomic_disable(plane, old_state);
|
||||
return tegra_plane_atomic_disable(plane, state);
|
||||
|
||||
memset(&window, 0, sizeof(window));
|
||||
window.src.x = new_state->src.x1 >> 16;
|
||||
@ -866,7 +868,7 @@ static int tegra_cursor_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void tegra_cursor_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct tegra_plane_state *tegra_plane_state = to_tegra_plane_state(new_state);
|
||||
@ -929,8 +931,10 @@ static void tegra_cursor_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void tegra_cursor_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct tegra_dc *dc;
|
||||
u32 value;
|
||||
|
||||
|
@ -388,8 +388,10 @@ static int tegra_shared_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void tegra_shared_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct tegra_plane *p = to_tegra_plane(plane);
|
||||
struct tegra_dc *dc;
|
||||
u32 value;
|
||||
@ -425,7 +427,7 @@ static void tegra_shared_plane_atomic_disable(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void tegra_shared_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct tegra_plane_state *tegra_plane_state = to_tegra_plane_state(new_state);
|
||||
@ -442,7 +444,7 @@ static void tegra_shared_plane_atomic_update(struct drm_plane *plane,
|
||||
return;
|
||||
|
||||
if (!new_state->visible) {
|
||||
tegra_shared_plane_atomic_disable(plane, old_state);
|
||||
tegra_shared_plane_atomic_disable(plane, state);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ static int tidss_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void tidss_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_device *ddev = plane->dev;
|
||||
struct tidss_device *tidss = to_tidss(ddev);
|
||||
@ -137,7 +137,7 @@ static void tidss_plane_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void tidss_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_device *ddev = plane->dev;
|
||||
struct tidss_device *tidss = to_tidss(ddev);
|
||||
|
@ -76,7 +76,7 @@ static int tilcdc_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void tilcdc_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
|
||||
|
@ -273,7 +273,7 @@ static int vbox_primary_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void vbox_primary_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct drm_crtc *crtc = new_state->crtc;
|
||||
@ -318,8 +318,10 @@ static void vbox_primary_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void vbox_primary_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_crtc *crtc = old_state->crtc;
|
||||
|
||||
/* vbox_do_modeset checks plane->state->fb and will disable if NULL */
|
||||
@ -381,8 +383,10 @@ static void copy_cursor_image(u8 *src, u8 *dst, u32 width, u32 height,
|
||||
}
|
||||
|
||||
static void vbox_cursor_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct vbox_private *vbox =
|
||||
container_of(plane->dev, struct vbox_private, ddev);
|
||||
@ -429,8 +433,10 @@ static void vbox_cursor_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void vbox_cursor_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct vbox_private *vbox =
|
||||
container_of(plane->dev, struct vbox_private, ddev);
|
||||
struct vbox_crtc *vbox_crtc = to_vbox_crtc(old_state->crtc);
|
||||
|
@ -1060,7 +1060,7 @@ static int vc4_plane_atomic_check(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void vc4_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
/* No contents here. Since we don't know where in the CRTC's
|
||||
* dlist we should be stored, our dlist is uploaded to the
|
||||
|
@ -130,8 +130,10 @@ static void virtio_gpu_update_dumb_bo(struct virtio_gpu_device *vgdev,
|
||||
}
|
||||
|
||||
static void virtio_gpu_primary_plane_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_device *dev = plane->dev;
|
||||
struct virtio_gpu_device *vgdev = dev->dev_private;
|
||||
struct virtio_gpu_output *output = NULL;
|
||||
@ -242,8 +244,10 @@ static void virtio_gpu_cursor_cleanup_fb(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_device *dev = plane->dev;
|
||||
struct virtio_gpu_device *vgdev = dev->dev_private;
|
||||
struct virtio_gpu_output *output = NULL;
|
||||
|
@ -93,7 +93,7 @@ static const struct drm_plane_funcs vkms_plane_funcs = {
|
||||
};
|
||||
|
||||
static void vkms_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct vkms_plane_state *vkms_plane_state;
|
||||
|
@ -370,9 +370,12 @@ vmw_du_cursor_plane_prepare_fb(struct drm_plane *plane,
|
||||
|
||||
void
|
||||
vmw_du_cursor_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state,
|
||||
plane);
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_crtc *crtc = new_state->crtc ?: old_state->crtc;
|
||||
struct vmw_private *dev_priv = vmw_priv(crtc->dev);
|
||||
struct vmw_display_unit *du = vmw_crtc_to_du(crtc);
|
||||
|
@ -460,7 +460,7 @@ int vmw_du_primary_plane_atomic_check(struct drm_plane *plane,
|
||||
int vmw_du_cursor_plane_atomic_check(struct drm_plane *plane,
|
||||
struct drm_atomic_state *state);
|
||||
void vmw_du_cursor_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state);
|
||||
struct drm_atomic_state *state);
|
||||
int vmw_du_cursor_plane_prepare_fb(struct drm_plane *plane,
|
||||
struct drm_plane_state *new_state);
|
||||
void vmw_du_plane_cleanup_fb(struct drm_plane *plane,
|
||||
|
@ -284,8 +284,10 @@ drm_connector_helper_funcs vmw_ldu_connector_helper_funcs = {
|
||||
|
||||
static void
|
||||
vmw_ldu_primary_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct vmw_private *dev_priv;
|
||||
struct vmw_legacy_display_unit *ldu;
|
||||
|
@ -730,8 +730,9 @@ static int vmw_sou_plane_update_surface(struct vmw_private *dev_priv,
|
||||
|
||||
static void
|
||||
vmw_sou_primary_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state, plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct drm_crtc *crtc = new_state->crtc;
|
||||
struct drm_pending_vblank_event *event = NULL;
|
||||
|
@ -1580,8 +1580,9 @@ static int vmw_stdu_plane_update_surface(struct vmw_private *dev_priv,
|
||||
*/
|
||||
static void
|
||||
vmw_stdu_primary_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state, plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct vmw_plane_state *vps = vmw_plane_state_to_vps(new_state);
|
||||
struct drm_crtc *crtc = new_state->crtc;
|
||||
|
@ -1165,8 +1165,10 @@ zynqmp_disp_plane_atomic_check(struct drm_plane *plane,
|
||||
|
||||
static void
|
||||
zynqmp_disp_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct zynqmp_disp_layer *layer = plane_to_layer(plane);
|
||||
|
||||
if (!old_state->fb)
|
||||
@ -1177,8 +1179,9 @@ zynqmp_disp_plane_atomic_disable(struct drm_plane *plane,
|
||||
|
||||
static void
|
||||
zynqmp_disp_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state, plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct zynqmp_disp_layer *layer = plane_to_layer(plane);
|
||||
bool format_changed = false;
|
||||
@ -1484,8 +1487,6 @@ static void
|
||||
zynqmp_disp_crtc_atomic_disable(struct drm_crtc *crtc,
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state,
|
||||
crtc);
|
||||
struct zynqmp_disp *disp = crtc_to_disp(crtc);
|
||||
struct drm_plane_state *old_plane_state;
|
||||
|
||||
@ -1494,10 +1495,9 @@ zynqmp_disp_crtc_atomic_disable(struct drm_crtc *crtc,
|
||||
* .shutdown() path if the plane is already disabled, skip
|
||||
* zynqmp_disp_plane_atomic_disable() in that case.
|
||||
*/
|
||||
old_plane_state = drm_atomic_get_old_plane_state(old_crtc_state->state,
|
||||
crtc->primary);
|
||||
old_plane_state = drm_atomic_get_old_plane_state(state, crtc->primary);
|
||||
if (old_plane_state)
|
||||
zynqmp_disp_plane_atomic_disable(crtc->primary, old_plane_state);
|
||||
zynqmp_disp_plane_atomic_disable(crtc->primary, state);
|
||||
|
||||
zynqmp_disp_disable(disp);
|
||||
|
||||
|
@ -181,7 +181,7 @@ static void zx_vl_rsz_setup(struct zx_plane *zplane, uint32_t format,
|
||||
}
|
||||
|
||||
static void zx_vl_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct zx_plane *zplane = to_zx_plane(plane);
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
@ -259,8 +259,10 @@ static void zx_vl_plane_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
static void zx_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
struct zx_plane *zplane = to_zx_plane(plane);
|
||||
void __iomem *hbsc = zplane->hbsc;
|
||||
|
||||
@ -351,7 +353,7 @@ static void zx_gl_rsz_setup(struct zx_plane *zplane, u32 src_w, u32 src_h,
|
||||
}
|
||||
|
||||
static void zx_gl_plane_atomic_update(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_plane_state *new_state = plane->state;
|
||||
struct zx_plane *zplane = to_zx_plane(plane);
|
||||
|
@ -1262,7 +1262,7 @@ struct drm_plane_helper_funcs {
|
||||
* transitional plane helpers, but it is optional.
|
||||
*/
|
||||
void (*atomic_update)(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state);
|
||||
struct drm_atomic_state *state);
|
||||
/**
|
||||
* @atomic_disable:
|
||||
*
|
||||
@ -1286,7 +1286,7 @@ struct drm_plane_helper_funcs {
|
||||
* transitional plane helpers, but it is optional.
|
||||
*/
|
||||
void (*atomic_disable)(struct drm_plane *plane,
|
||||
struct drm_plane_state *old_state);
|
||||
struct drm_atomic_state *state);
|
||||
|
||||
/**
|
||||
* @atomic_async_check:
|
||||
|
Loading…
Reference in New Issue
Block a user