Re: [PATCH] drm/vc4: plane: Remove WARN on state being set in plane_reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Stefan,

On 02/12/24 09:03, Stefan Wahren wrote:
From: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx>
Signed-off-by: Stefan Wahren <wahrenst@xxxxxxx>

Was this patch applied? Let me know if you would like it to be applied
to drm-misc-next.

Best Regards,
- Maíra

---
  drivers/gpu/drm/vc4/vc4_plane.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
index ba6e86d62a77..1aaa4938824b 100644
--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@ -330,7 +330,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)
--
2.34.1





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux