Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/vc4: txp: Force alpha to be 0xff if it's disabled

If we use a format that has padding instead of the alpha component (such
as XRGB8888), it appears that the Transposer will fill the padding to 0,
disregarding what was stored in the input buffer padding.

This leads to issues with IGT, since it will set the padding to 0xff,
but will then compare the CRC of the two frames which will thus fail.
Another nice side effect is that it is now possible to just use the
buffer as ARGB.

Fixes: 008095e065a8 ("drm/vc4: Add support for the transposer block")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20220328153659.2382206-4-maxime@cerno.tech

+6
+6
drivers/gpu/drm/vc4/vc4_txp.c
··· 304 304 305 305 if (fb->format->has_alpha) 306 306 ctrl |= TXP_ALPHA_ENABLE; 307 + else 308 + /* 309 + * If TXP_ALPHA_ENABLE isn't set and TXP_ALPHA_INVERT is, the 310 + * hardware will force the output padding to be 0xff. 311 + */ 312 + ctrl |= TXP_ALPHA_INVERT; 307 313 308 314 gem = drm_fb_cma_get_gem_obj(fb, 0); 309 315 TXP_WRITE(TXP_DST_PTR, gem->paddr + fb->offsets[0]);