drm/vc4: plane: Remove WARN on state being set in plane_reset

It is permitted on situations such as system resume for plane->state
to be non-NULL, and that should be handled by freeing it. Do so.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241202120343.33726-1-wahrenst@gmx.net
This commit is contained in:
Dave Stevenson 2024-12-02 13:03:43 +01:00 committed by Maíra Canal
parent 4ee06e3b61
commit c5cf801914
No known key found for this signature in database
GPG Key ID: 3FF30E8A7688FAAA

View File

@ -368,7 +368,10 @@ static void vc4_plane_reset(struct drm_plane *plane)
{
struct vc4_plane_state *vc4_state;
WARN_ON(plane->state);
if (plane->state)
__drm_atomic_helper_plane_destroy_state(plane->state);
kfree(plane->state);
vc4_state = kzalloc(sizeof(*vc4_state), GFP_KERNEL);
if (!vc4_state)