From: Hawking Zhang Date: Thu, 16 Jan 2020 04:39:15 +0000 (+0800) Subject: drm/amdgpu: check if driver should try recovery in ras recovery path X-Git-Tag: v5.6-rc1~114^2~6^2~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=93af20f74e8eb4077fecdcc6e8093f13f0059bc9;p=thirdparty%2Flinux.git drm/amdgpu: check if driver should try recovery in ras recovery path 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 Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 991c4eaac2449..766be7f182825 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -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); }