The imx-dcss atomic_check implementation uses the deprecated
drm_atomic_get_existing_crtc_state() helper.

This hook is called as part of the global atomic_check, thus before the
states are swapped. The existing state thus points to the new state, and
we can use drm_atomic_get_new_crtc_state() instead.

Reviewed-by: Laurentiu Palcu <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
---
To: Laurentiu Palcu <[email protected]>
To: Shawn Guo <[email protected]>
To: Sascha Hauer <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
 drivers/gpu/drm/imx/dcss/dcss-plane.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/imx/dcss/dcss-plane.c 
b/drivers/gpu/drm/imx/dcss/dcss-plane.c
index 
ab6d32bad756d080e1c56d7574403febceff94f4..3a063a53c8dfa6bc5bbbf9afc7ff6519199c2f19
 100644
--- a/drivers/gpu/drm/imx/dcss/dcss-plane.c
+++ b/drivers/gpu/drm/imx/dcss/dcss-plane.c
@@ -157,12 +157,12 @@ static int dcss_plane_atomic_check(struct drm_plane 
*plane,
                return 0;
 
        dma_obj = drm_fb_dma_get_gem_obj(fb, 0);
        WARN_ON(!dma_obj);
 
-       crtc_state = drm_atomic_get_existing_crtc_state(state,
-                                                       new_plane_state->crtc);
+       crtc_state = drm_atomic_get_new_crtc_state(state,
+                                                  new_plane_state->crtc);
 
        hdisplay = crtc_state->adjusted_mode.hdisplay;
        vdisplay = crtc_state->adjusted_mode.vdisplay;
 
        if (!dcss_plane_is_source_size_allowed(new_plane_state->src_w >> 16,

-- 
2.51.0

Reply via email to