From 6d5323571d93d5a340edd6c2771a0e0da91e511a Mon Sep 17 00:00:00 2001 From: Paolo Pisati Date: Tue, 1 Jun 2021 10:00:26 +0000 Subject: [PATCH] convert .atomic_update() hooks to handle atomic_state See also, coccinelle upstream conversion: commit 977697e20b3d758786b67edc33941e5c410ffe4d Author: Maxime Ripard Date: Fri Feb 19 13:00:29 2021 +0100 drm/atomic: Pass the full state to planes atomic disable and update Signed-off-by: Paolo Pisati --- module/evdi_modeset.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/module/evdi_modeset.c b/module/evdi_modeset.c index 1712f3b..fb1752f 100644 --- a/module/evdi_modeset.c +++ b/module/evdi_modeset.c @@ -205,8 +205,16 @@ static const struct drm_crtc_funcs evdi_crtc_funcs = { }; static void evdi_plane_atomic_update(struct drm_plane *plane, - struct drm_plane_state *old_state) +#if KERNEL_VERSION(5, 13, 0) < LINUX_VERSION_CODE + struct drm_plane_state *old_state +#else + struct drm_atomic_state *atom_state +#endif + ) { +#if KERNEL_VERSION(5, 13, 0) >= LINUX_VERSION_CODE + struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(atom_state, plane); +#endif struct drm_plane_state *state; struct evdi_device *evdi; struct evdi_painter *painter; @@ -294,8 +302,16 @@ static void evdi_cursor_atomic_get_rect(struct drm_clip_rect *rect, } static void evdi_cursor_atomic_update(struct drm_plane *plane, - struct drm_plane_state *old_state) +#if KERNEL_VERSION(5, 13, 0) < LINUX_VERSION_CODE + struct drm_plane_state *old_state +#else + struct drm_atomic_state *atom_state +#endif + ) { +#if KERNEL_VERSION(5, 13, 0) >= LINUX_VERSION_CODE + struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(atom_state, plane); +#endif if (plane && plane->state && plane->dev && plane->dev->dev_private) { struct drm_plane_state *state = plane->state; struct evdi_device *evdi = plane->dev->dev_private;