drm/amdgpu: During compute disable GFXOFF for Sienna_Cichlid
authorHarish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Thu, 22 Oct 2020 13:57:54 +0000 (09:57 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Oct 2020 19:33:48 +0000 (15:33 -0400)
Workaround to fix the soft hang observed in certain compute
applications.

Acked-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c

index 0544460..92b7e74 100644 (file)
@@ -648,6 +648,13 @@ void amdgpu_amdkfd_set_compute_idle(struct kgd_dev *kgd, bool idle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)kgd;
 
+       /* Temp workaround to fix the soft hang observed in certain compute
+        * applications if GFXOFF is enabled.
+        */
+       if (adev->asic_type == CHIP_SIENNA_CICHLID) {
+               pr_debug("GFXOFF is %s\n", idle ? "enabled" : "disabled");
+               amdgpu_gfx_off_ctrl(adev, idle);
+       }
        amdgpu_dpm_switch_power_profile(adev,
                                        PP_SMC_POWER_PROFILE_COMPUTE,
                                        !idle);