Skip to contentSkip to conversation

drm/vc4: fix error code in vc4_check_tex_size()

PATCH Applied Dan Carpenter 2 participants 2 messages Jun 22, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vc4: fix error code in vc4_check_tex_size()

The vc4_check_tex_size() function is supposed to return false on error but this error path accidentally returns -ENODEV (which means true).

Fixes 30f8c74ca9b7 ("drm/vc4: Warn if some v3d code is run on BCM2711")
---
 drivers/gpu/drm/vc4/vc4_validate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_validate.c +1 -1
index 833eb623d545..2feba55bcef7 100644
@@ -170,7 +170,7 @@ vc4_check_tex_size(struct vc4_exec_info *exec, struct drm_gem_cma_object *fbo,
 	uint32_t utile_h = utile_height(cpp);
 
 	if (WARN_ON_ONCE(vc4->is_vc5))
-		return -ENODEV;
+		return false;
 
 	/* The shaded vertex format stores signed 12.4 fixed point
 	 * (-2048,2047) offsets from the viewport center, so we should
Signature · 1 line
2.35.1
#1 lore raw

Re: (subset) [PATCH] drm/vc4: fix error code in vc4_check_tex_size()

Quoted 4 lines · Dan Carpenter

The vc4_check_tex_size() function is supposed to return false on error but this error path accidentally returns -ENODEV (which means true).

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

Thanks!
Maxime