pan/crc: Disallow CRC on sparse AFBC images

AFBC-P images are read only.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
Loïc Molinari 2026-02-11 08:49:20 +01:00
parent dbd3f9b6ad
commit 8c7adaf1ea

View file

@ -107,6 +107,10 @@ pan_fb_color_attachment_should_crc(const struct pan_fb_color_attachment *rt,
if (!drm_is_afbc(mod))
return true;
/* AFBC-P images are read only. */
if (!(mod & AFBC_FORMAT_MOD_SPARSE))
return false;
/* AFBC render block size must fit in a single pass. */
renderblk_sz = pan_afbc_renderblock_size(mod);
if (tile_size < renderblk_sz.width * renderblk_sz.height)