From 6b3ee86989edb854094d3aba122b40498fca94d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 30 Jul 2019 16:30:04 -0400 Subject: [PATCH] radeonsi: disable SDMA image copies on dGPUs to fix corruption in games Cc: 19.1 19.2 Reviewed-by: Pierre-Eric Pelloux-Prayer --- src/gallium/drivers/radeonsi/cik_sdma.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/cik_sdma.c b/src/gallium/drivers/radeonsi/cik_sdma.c index ba62295318f..47d8afc05da 100644 --- a/src/gallium/drivers/radeonsi/cik_sdma.c +++ b/src/gallium/drivers/radeonsi/cik_sdma.c @@ -500,7 +500,15 @@ static void cik_sdma_copy(struct pipe_context *ctx, return; } - if ((sctx->chip_class == GFX7 || sctx->chip_class == GFX8) && + /* SDMA causes corruption. See: + * https://bugs.freedesktop.org/show_bug.cgi?id=110575 + * https://bugs.freedesktop.org/show_bug.cgi?id=110635 + * + * Keep SDMA enabled on APUs. + */ + if ((sctx->screen->debug_flags & DBG(FORCE_DMA) || + !sctx->screen->info.has_dedicated_vram) && + (sctx->chip_class == GFX7 || sctx->chip_class == GFX8) && cik_sdma_copy_texture(sctx, dst, dst_level, dstx, dsty, dstz, src, src_level, src_box)) return; -- 2.30.2