Skip to contentSkip to conversation

drm/vc4: plane: check drm_gem_plane_helper_prepare_fb() return value

PATCH Applied Simon Ser 3 participants 3 messages Dec 16, 2023 – Jan 2, 2024

Subsystems (3)
lore
Share & tools
lore

Simon Ser

author
#0 lore raw

PATCH 1/1 drm/vc4: plane: check drm_gem_plane_helper_prepare_fb() return value

Bubble up any error to the caller.

Cc Maxime Ripard <[email protected]>
Cc Kees Cook <[email protected]>
Cc Dave Stevenson <[email protected]>
---
 drivers/gpu/drm/vc4/vc4_plane.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_plane.c +4 -1
index 00e713faecd5..b8184374332c 100644
@@ -1497,13 +1497,16 @@ static int vc4_prepare_fb(struct drm_plane *plane,
 			  struct drm_plane_state *state)
 {
 	struct vc4_bo *bo;
+	int ret;
 
 	if (!state->fb)
 		return 0;
 
 	bo = to_vc4_bo(&drm_fb_dma_get_gem_obj(state->fb, 0)->base);
 
-	drm_gem_plane_helper_prepare_fb(plane, state);
+	ret = drm_gem_plane_helper_prepare_fb(plane, state);
+	if (ret)
+		return ret;
 
 	if (plane->state->fb == state->fb)
 		return 0;
Signature · 1 line
2.43.0
reviewer Reviewed-by on v1 1/1
#1 lore raw

Hi Simon,

Quoted 6 lines · Simon Ser

Bubble up any error to the caller.

Cc Maxime Ripard <[email protected]>
Cc Kees Cook <[email protected]>
Cc Dave Stevenson <[email protected]>

Best Regards,
- Maíra

Quoted 26 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
index 00e713faecd5..b8184374332c 100644
@@ -1497,13 +1497,16 @@ static int vc4_prepare_fb(struct drm_plane *plane,
  			  struct drm_plane_state *state)
  {
  	struct vc4_bo *bo;
+	int ret;
 
  	if (!state->fb)
  		return 0;
 
  	bo = to_vc4_bo(&drm_fb_dma_get_gem_obj(state->fb, 0)->base);
 
-	drm_gem_plane_helper_prepare_fb(plane, state);
+	ret = drm_gem_plane_helper_prepare_fb(plane, state);
+	if (ret)
+		return ret;
 
  	if (plane->state->fb == state->fb)
  		return 0;
maintainer Applied
#2 lore raw

Re: (subset) [PATCH] drm/vc4: plane: check drm_gem_plane_helper_prepare_fb() return value

In reply to Simon Ser
Quoted 3 lines · Simon Ser

Bubble up any error to the caller.

Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime