From e9826a1bb2fd156479c62e915d3cab567876061f Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 26 May 2020 09:53:27 +0200 Subject: [PATCH] ac/surface: set SCANOUT if surf->is_displayable MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: ba10fb3f7f4 ("radeonsi: preserve the scanout flag for shared resources on gfx9 and gfx10") Reviewed-by: Marek Olšák Part-of: --- src/amd/common/ac_surface.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 1e4d1ff942a..54bf476a213 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -1906,6 +1906,9 @@ int ac_compute_surface(ADDR_HANDLE addrlib, const struct radeon_info *info, surf->alignment = MAX2(surf->alignment, surf->cmask_alignment); } + if (surf->is_displayable) + surf->flags |= RADEON_SURF_SCANOUT; + if (surf->dcc_size && /* dcc_size is computed on GFX9+ only if it's displayable. */ (info->chip_class >= GFX9 || !get_display_flag(config, surf))) { -- 2.30.2