]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/sun4i: Switch to drm_atomic_get_new_crtc_state()
authorMaxime Ripard <mripard@kernel.org>
Tue, 30 Sep 2025 10:59:43 +0000 (12:59 +0200)
committerMaxime Ripard <mripard@kernel.org>
Mon, 6 Oct 2025 11:59:18 +0000 (13:59 +0200)
The sun4i 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: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://lore.kernel.org/r/20250930-drm-no-more-existing-state-v5-28-eeb9e1287907@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/gpu/drm/sun4i/sun8i_ui_layer.c
drivers/gpu/drm/sun4i/sun8i_vi_layer.c

index f97be0040aab29cb4e138fcceb20e90c72db0252..94ac6ad6f30688a048e594811d2ae72aaa44376d 100644 (file)
@@ -206,8 +206,7 @@ static int sun8i_ui_layer_atomic_check(struct drm_plane *plane,
        if (!crtc)
                return 0;
 
-       crtc_state = drm_atomic_get_existing_crtc_state(state,
-                                                       crtc);
+       crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
        if (WARN_ON(!crtc_state))
                return -EINVAL;
 
index a09ee4097537fca8b653f34a833b36b69e343ea5..1f77e1d2984548e746805f8323f537f3b4d93198 100644 (file)
@@ -327,8 +327,7 @@ static int sun8i_vi_layer_atomic_check(struct drm_plane *plane,
        if (!crtc)
                return 0;
 
-       crtc_state = drm_atomic_get_existing_crtc_state(state,
-                                                       crtc);
+       crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
        if (WARN_ON(!crtc_state))
                return -EINVAL;