radeonsi: disable SDMA image copies on dGPUs to fix corruption in games
authorMarek Olšák <marek.olsak@amd.com>
Tue, 30 Jul 2019 20:30:04 +0000 (16:30 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 6 Aug 2019 21:08:08 +0000 (17:08 -0400)
Cc: 19.1 19.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
src/gallium/drivers/radeonsi/cik_sdma.c

index ba62295318f63d4a7bd20e147830533a8db3dbe4..47d8afc05da746dc89691f8a74ebdcf805eeef9b 100644 (file)
@@ -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;