drm/vc4: plane: Remove WARN on state being set in plane_reset
Subsystems (3)
PATCH 1/1 drm/vc4: plane: Remove WARN on state being set in plane_reset
From: Dave Stevenson <[email protected]>
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.
--- drivers/gpu/drm/vc4/vc4_plane.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_plane.c +4 -1
@@ -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
Quoted 7 lines · Stefan Wahren
From: Dave Stevenson <[email protected]>
It is permitted on situations such as system resume for
plane->stateto be non-NULL, and that should be handled by freeing it. Do so.[ ... ]
Thanks!
Maxime
Maíra Canal
reviewerHi Stefan,
Quoted 7 lines · Stefan Wahren
From: Dave Stevenson <[email protected]>
It is permitted on situations such as system resume for
plane->stateto be non-NULL, and that should be handled by freeing it. Do so.Signed-off-by Dave Stevenson <[email protected]>Signed-off-by Stefan Wahren <[email protected]>
Was this patch applied? Let me know if you would like it to be applied to drm-misc-next.
Best Regards,
- Maíra
Quoted 23 lines
--- drivers/gpu/drm/vc4/vc4_plane.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/vc4/vc4_plane.c +4
-2@@ -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
Hi Maíra,
Am 11.12.24 um 14:19 schrieb Maíra Canal:
Quoted 5 lines
Hi Stefan,
Quoted 2 lines · Stefan Wahren
From: Dave Stevenson <[email protected]>
Quoted 7 lines
Quoted 5 lines
It is permitted on situations such as system resume for
plane->stateto be non-NULL, and that should be handled by freeing it. Do so.Signed-off-by Dave Stevenson <[email protected]>Signed-off-by Stefan Wahren <[email protected]>Was this patch applied?
No, but Maxime send his RB.
Quoted 2 lines
Let me know if you would like it to be applied
to drm-misc-next.
Yes, please.
Best regards
Quoted 30 lines
Best Regards,
- MaíraQuoted 25 lines
---
drivers/gpu/drm/vc4/vc4_plane.c| 5 ++++-1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/vc4/vc4_plane.c +4
-1@@ -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
Hi Stefan,
Quoted 11 lines · Stefan Wahren
Hi Maíra,
Am 11.12.24 um 14:19 schrieb Maíra Canal:
Quoted 8 lines
Hi Stefan,
Quoted 5 lines · Stefan Wahren
From: Dave Stevenson <[email protected]>
It is permitted on situations such as system resume for
plane->stateto be non-NULL, and that should be handled by freeing it. Do so.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by Dave Stevenson <[email protected]>Signed-off-by Stefan Wahren <[email protected]>Was this patch applied?
No, but Maxime send his RB.
Quoted 2 lines
Let me know if you would like it to be applied
to drm-misc-next.Yes, please.
Applied to misc/kernel.git (drm-misc-next) [1].
[1] https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/c5cf801914ef3e67923e5dc912e04167e665dd11
Best Regards,
- Maíra
Quoted 33 lines
Best regards
Quoted 30 lines
Best Regards,
- MaíraQuoted 25 lines
---
drivers/gpu/drm/vc4/vc4_plane.c| 5 ++++-1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/vc4/vc4_plane.c +4
-1@@ -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)
Signature · 1 line
2.34.1