On 2026-10-30 06:27, Maxime Ripard wrote:
> Commit 2bcec01cf105 ("drm/amdgpu_dm: Convert to atomic_create_state")
> converted the amdgpu planes to use atomic_create_state instead of reset.
>
> Unlike reset, atomic_create_state is meant to allocate a new default
> state without any side effect on the hardware or software state.
>
> However, during the conversion we forgot to remove the call to destroy
> the existing plane state if any. While this was expected from a reset
> implementation, it's not for an atomic_create_state one. Remove it.
>
> Fixes: 2bcec01cf105 ("drm/amdgpu_dm: Convert to atomic_create_state")
> Signed-off-by: Maxime Ripard <[email protected]>
Reviewed-by: Leo Li <[email protected]>
Thanks!
>
> ---
>
> To: Harry Wentland <[email protected]>
> To: Leo Li <[email protected]>
> To: Rodrigo Siqueira <[email protected]>
> To: Alex Deucher <[email protected]>
> To: Christian König <[email protected]>
> Cc: [email protected]
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> index 2f88b9d65b82..779dabb7fc51 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> @@ -1821,7 +1821,4 @@ STATIC_IFN_KUNIT struct drm_plane_state
> *amdgpu_dm_plane_drm_plane_create_state(
> }
>
> - if (plane->state)
> - plane->funcs->atomic_destroy_state(plane, plane->state);
> -
> __drm_atomic_helper_plane_state_init(&amdgpu_state->base, plane);
> amdgpu_state->degamma_tf = AMDGPU_TRANSFER_FUNCTION_DEFAULT;
>