From 1c1f6cb53ef5cab288891acd600c8d383cdff90e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Molinari?= Date: Thu, 13 Nov 2025 10:07:40 +0100 Subject: [PATCH] pan/desc: Issue TSIX-2033 only affects pre-frame shaders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As opposed to pre-frame shaders 0 and 1, we can keep using the INTERSECT mode for the post-frame shader when any of the clean tile/pixel flags are set. Signed-off-by: Loïc Molinari Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/lib/pan_desc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/panfrost/lib/pan_desc.c b/src/panfrost/lib/pan_desc.c index 3a0affd73ab..d1b7b1637ed 100644 --- a/src/panfrost/lib/pan_desc.c +++ b/src/panfrost/lib/pan_desc.c @@ -978,13 +978,14 @@ pan_emit_rt(const struct pan_fb_info *fb, unsigned layer_idx, unsigned idx, } #if PAN_ARCH >= 6 -/* All Bifrost and Valhall GPUs are affected by issue TSIX-2033: +/* All GPUs starting from Bifrost are affected by issue TSIX-2033: * * Forcing clean_tile_writes breaks INTERSECT readbacks * - * To workaround, use the frame shader mode ALWAYS instead of INTERSECT if - * clean tile writes is forced. Since INTERSECT is a hint that the hardware may - * ignore, this cannot affect correctness, only performance */ + * To workaround, use the pre-frame shader mode ALWAYS instead of INTERSECT if + * clean_tile_write_enable is set on either one of the color, depth or stencil + * buffers. Since INTERSECT is a hint that the hardware may ignore, this + * cannot affect correctness, only performance. */ static enum mali_pre_post_frame_shader_mode pan_fix_frame_shader_mode(enum mali_pre_post_frame_shader_mode mode, @@ -1108,8 +1109,7 @@ GENX(pan_emit_fbd)(const struct pan_fb_info *fb, unsigned layer_idx, pan_clean_tile_write_any_set(clean_tile)); cfg.pre_frame_1 = pan_fix_frame_shader_mode(fb->bifrost.pre_post.modes[1], pan_clean_tile_write_any_set(clean_tile)); - cfg.post_frame = pan_fix_frame_shader_mode(fb->bifrost.pre_post.modes[2], - pan_clean_tile_write_any_set(clean_tile)); + cfg.post_frame = fb->bifrost.pre_post.modes[2]; #if PAN_ARCH < 9 /* On Bifrost, the layer_id is passed through a push_uniform, which forces * us to have one pre/post DCD array per layer. */