drm/amdgpu: check if driver should try recovery in ras recovery path
authorHawking Zhang <Hawking.Zhang@amd.com>
Thu, 16 Jan 2020 04:39:15 +0000 (12:39 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Jan 2020 18:40:47 +0000 (13:40 -0500)
To allow the flexibilty for user to disable gpu recovery
in RAS recovery path by module parameter amdgpu_gpu_recovery

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

index 991c4ea..766be7f 100644 (file)
@@ -1353,7 +1353,8 @@ static void amdgpu_ras_do_recovery(struct work_struct *work)
        struct amdgpu_ras *ras =
                container_of(work, struct amdgpu_ras, recovery_work);
 
-       amdgpu_device_gpu_recover(ras->adev, 0);
+       if (amdgpu_device_should_recover_gpu(ras->adev))
+               amdgpu_device_gpu_recover(ras->adev, 0);
        atomic_set(&ras->in_recovery, 0);
 }