Skip to content

Commit

Permalink
vc4/hvs: Fix lbm size calculation for yuv
Browse files Browse the repository at this point in the history
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: raspberrypi#5912
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
  • Loading branch information
popcornmix committed Feb 19, 2024
1 parent 15b5c2d commit 1fec5aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vc4/vc4_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ static unsigned int vc4_lbm_channel_size(const struct drm_plane_state *state,
if (!components)
return 0;

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

words = width * wpc * components;
Expand Down

0 comments on commit 1fec5aa

Please sign in to comment.