radeonsi: add AMD_DEBUG=nodmacopyimage for debugging
authorMarek Olšák <marek.olsak@amd.com>
Thu, 2 Jan 2020 20:43:53 +0000 (15:43 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 6 Jan 2020 20:38:32 +0000 (15:38 -0500)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
src/gallium/drivers/radeonsi/cik_sdma.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h

index 9ca9ba436cfd9b51a14f70cacfcc94bc3924955e..c2406604d9e25022811184f823a8c8fb5334c7f8 100644 (file)
@@ -698,7 +698,8 @@ static void cik_sdma_copy(struct pipe_context *ctx,
         * Keep SDMA enabled on APUs.
         */
        if (sctx->screen->debug_flags & DBG(FORCE_SDMA) ||
-           !sctx->screen->info.has_dedicated_vram) {
+           (!sctx->screen->info.has_dedicated_vram &&
+            !(sctx->screen->debug_flags & DBG(NO_SDMA_COPY_IMAGE)))) {
                if ((sctx->chip_class == GFX7 || sctx->chip_class == GFX8) &&
                    cik_sdma_copy_texture(sctx, dst, dst_level, dstx, dsty, dstz,
                                          src, src_level, src_box))
index 9c26da9d49c26210fe576064e1c666f9b13532f4..52048ad7a548c6ff08bd0d50d35e19806a7ca0eb 100644 (file)
@@ -88,6 +88,7 @@ static const struct debug_named_value debug_options[] = {
        { "forcedma", DBG(FORCE_SDMA), "Use SDMA for all operations when possible." },
        { "nodma", DBG(NO_SDMA), "Disable SDMA" },
        { "nodmaclear", DBG(NO_SDMA_CLEARS), "Disable SDMA clears" },
+       { "nodmacopyimage", DBG(NO_SDMA_COPY_IMAGE), "Disable SDMA image copies" },
        { "nowc", DBG(NO_WC), "Disable GTT write combining" },
        { "check_vm", DBG(CHECK_VM), "Check VM faults and dump debug info." },
        { "reserve_vmid", DBG(RESERVE_VMID), "Force VMID reservation per context." },
index 0aef94b0a2bddea55c5f48a95361158e17efec93..8e960341ae753feff38be1d5858303b6cd636661 100644 (file)
@@ -169,6 +169,7 @@ enum {
        DBG_FORCE_SDMA,
        DBG_NO_SDMA,
        DBG_NO_SDMA_CLEARS,
+       DBG_NO_SDMA_COPY_IMAGE,
        DBG_NO_WC,
        DBG_CHECK_VM,
        DBG_RESERVE_VMID,