radeonsi: add AMD_DEBUG=nodmaclear for debugging
authorMarek Olšák <marek.olsak@amd.com>
Thu, 2 Jan 2020 20:34:00 +0000 (15:34 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 6 Jan 2020 20:38:30 +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/si_dma_cs.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h

index c550a62ee0b56ea245806676ade87d67372b8135..9cb192307a24c9d1e50a0463ccce7b2e085fb7e9 100644 (file)
@@ -75,7 +75,8 @@ void si_sdma_clear_buffer(struct si_context *sctx, struct pipe_resource *dst,
        assert(size);
        assert(size % 4 == 0);
 
-       if (!cs || dst->flags & PIPE_RESOURCE_FLAG_SPARSE) {
+       if (!cs || dst->flags & PIPE_RESOURCE_FLAG_SPARSE ||
+           sctx->screen->debug_flags & DBG(NO_SDMA_CLEARS)) {
                sctx->b.clear_buffer(&sctx->b, dst, offset, size, &clear_value, 4);
                return;
        }
index 3bea85cf8dc8541fd731b9aefaa9f8bfae3804f8..9c26da9d49c26210fe576064e1c666f9b13532f4 100644 (file)
@@ -87,6 +87,7 @@ static const struct debug_named_value debug_options[] = {
        /* Driver 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" },
        { "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 1f64f77342f5c2e0d3729935a039fcd2bd2e6ac0..0aef94b0a2bddea55c5f48a95361158e17efec93 100644 (file)
@@ -168,6 +168,7 @@ enum {
        /* Driver options: */
        DBG_FORCE_SDMA,
        DBG_NO_SDMA,
+       DBG_NO_SDMA_CLEARS,
        DBG_NO_WC,
        DBG_CHECK_VM,
        DBG_RESERVE_VMID,