From ba80a11b69c52444e6e2946eb340dd61b48cd986 Mon Sep 17 00:00:00 2001 From: Ganesh Belgur Ramachandra Date: Mon, 24 Feb 2025 12:17:56 +0530 Subject: [PATCH] amd: use 128B compression for scanout images when drm.minor <63 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 8328e575 ("ac/surface/gfx12: enable DCC 256B compressed blocks and reorder modifiers") Reviewed-by: Marek Olšák Part-of: --- src/amd/common/ac_surface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index b88731df52a..08541bde567 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -3315,6 +3315,8 @@ static bool gfx12_compute_surface(struct ac_addrlib *addrlib, const struct radeo /* Don't change the DCC settings for imported buffers - they might differ. */ !(surf->flags & RADEON_SURF_IMPORTED)) { surf->u.gfx9.color.dcc.max_compressed_block_size = V_028C78_MAX_BLOCK_SIZE_256B; + if ((info->drm_minor < 63) && (surf->flags & RADEON_SURF_SCANOUT)) + surf->u.gfx9.color.dcc.max_compressed_block_size = V_028C78_MAX_BLOCK_SIZE_128B; } }