drm/amdgpu: add experimental resets debug flag
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 20 Aug 2024 19:19:04 +0000 (15:19 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Aug 2024 17:38:36 +0000 (13:38 -0400)
Add this flag to enable experimental resets for testing before they
are fully validated.

Reviewed-and-tested-by: Jiadong Zhu <Jiadong.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

index 7fe41a3c25413d9ac473284c3b3920017b749054..e095572458cde4524e767e26e7eaae7fafb4fd87 100644 (file)
@@ -1164,6 +1164,7 @@ struct amdgpu_device {
        bool                            debug_disable_soft_recovery;
        bool                            debug_use_vram_fw_buf;
        bool                            debug_enable_ras_aca;
+       bool                            debug_exp_resets;
 
        bool                            enforce_isolation[MAX_XCP];
        /* Added this mutex for cleaner shader isolation between GFX and compute processes */
index 5dd39e6c6223e3c327e4107a38334bff0805dfa4..8dee7c62c801da1f030df40f3a6b3b24d433c441 100644 (file)
@@ -131,6 +131,7 @@ enum AMDGPU_DEBUG_MASK {
        AMDGPU_DEBUG_DISABLE_GPU_SOFT_RECOVERY = BIT(2),
        AMDGPU_DEBUG_USE_VRAM_FW_BUF = BIT(3),
        AMDGPU_DEBUG_ENABLE_RAS_ACA = BIT(4),
+       AMDGPU_DEBUG_ENABLE_EXP_RESETS = BIT(5),
 };
 
 unsigned int amdgpu_vram_limit = UINT_MAX;
@@ -2199,6 +2200,11 @@ static void amdgpu_init_debug_options(struct amdgpu_device *adev)
                pr_info("debug: enable RAS ACA\n");
                adev->debug_enable_ras_aca = true;
        }
+
+       if (amdgpu_debug_mask & AMDGPU_DEBUG_ENABLE_EXP_RESETS) {
+               pr_info("debug: enable experimental reset features\n");
+               adev->debug_exp_resets = true;
+       }
 }
 
 static unsigned long amdgpu_fix_asic_type(struct pci_dev *pdev, unsigned long flags)