Skip to content

Commit f462f15

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 1f2f1c7 commit f462f15

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
@@ -742,7 +742,7 @@ static unsigned int vc4_lbm_channel_size(const struct drm_plane_state *state,
742742
if (!components)
743743
return 0;
744744

745-
if (state->alpha != DRM_BLEND_ALPHA_OPAQUE)
745+
if (state->alpha != DRM_BLEND_ALPHA_OPAQUE && info->has_alpha)
746746
components -= 1;
747747

748748
words = width * wpc * components;

0 commit comments

Comments
 (0)