From e39e303e23f1f4e8f09c06d06699ec2340baa6c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Molinari?= Date: Mon, 9 Feb 2026 15:08:49 +0100 Subject: [PATCH] pan/crc: Check CRC buffer validity and coverage on v5 and v6 too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CRC RT selection for v5 and v6 (v4 isn't supported) currently returns 0 (instead of -1) as long as the CRC buffer is usable but without checking its validity like it's done for v7+. While it doesn't incorrectly enable Transaction Elimination, it uselessly makes dependent CRC code paths taken. Signed-off-by: Loïc Molinari --- src/panfrost/lib/pan_desc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/panfrost/lib/pan_desc.c b/src/panfrost/lib/pan_desc.c index 15932d3269c..090a47bc3f0 100644 --- a/src/panfrost/lib/pan_desc.c +++ b/src/panfrost/lib/pan_desc.c @@ -124,7 +124,8 @@ GENX(pan_select_crc_rt)(const struct pan_fb_info *fb, unsigned tile_size) #if PAN_ARCH <= 6 if (fb->rt_count == 1 && fb->rts[0].view && !fb->rts[0].discard && pan_image_view_has_crc(fb->rts[0].view) && - renderblock_fits_in_single_pass(fb->rts[0].view, tile_size)) + renderblock_fits_in_single_pass(fb->rts[0].view, tile_size) && + (*(fb->rts[0].crc_valid) || pan_fb_is_fully_covered(fb))) return 0; return -1;