Skip to content

Commit 1492285

Browse files
committed
vc4/hvs: Fix lbm size calculation for yuv
The code was reducing the number of components by one when we were not blending with alpha. But that only makes sense if the components include alpha. For YUV, we were reducing the number of components for Y from one to zero which resulted in no lbm space being allocated. Fixes: #5912 Signed-off-by: Dom Cobley <[email protected]>
1 parent d2b79c6 commit 1492285

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/vc4/vc4_plane.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ static unsigned int vc4_lbm_channel_size(const struct drm_plane_state *state,
733733
if (!components)
734734
return 0;
735735

736-
if (state->alpha != DRM_BLEND_ALPHA_OPAQUE)
736+
if (state->alpha != DRM_BLEND_ALPHA_OPAQUE && info->has_alpha)
737737
components -= 1;
738738

739739
words = width * wpc * components;

0 commit comments

Comments
 (0)