On Tue, Sep 02, 2025 at 11:35:12AM +0200, Maxime Ripard wrote:
> The armada 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.
> 
> Signed-off-by: Maxime Ripard <[email protected]>
> 
> ---
> To: Russell King <[email protected]>
> ---
>  drivers/gpu/drm/armada/armada_plane.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/armada/armada_plane.c 
> b/drivers/gpu/drm/armada/armada_plane.c
> index 
> cc47c032dbc151a463cbd0b0d048c74c2828f253..786bcce0dc20eadab14c5bee97593ae3e05732b1
>  100644
> --- a/drivers/gpu/drm/armada/armada_plane.c
> +++ b/drivers/gpu/drm/armada/armada_plane.c
> @@ -93,12 +93,11 @@ int armada_drm_plane_atomic_check(struct drm_plane *plane,
>               new_plane_state->visible = false;
>               return 0;
>       }
>  
>       if (state)

This check looks like nonsense. There should be no way this gets called
without a drm_atomic_state. Could use another patch to clean up this
mess as well.

> -             crtc_state = drm_atomic_get_existing_crtc_state(state,
> -                                                             crtc);
> +             crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
>       else
>               crtc_state = crtc->state;
>  
>       ret = drm_atomic_helper_check_plane_state(new_plane_state, crtc_state,
>                                                 0,
> 
> -- 
> 2.50.1

-- 
Ville Syrjälä
Intel

Reply via email to