[PATCH] drm/amdgpu: Always call kfd post reset after reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Even reset failed, kfd post reset need to be called to make lock balance on
kfd side

Change-Id: I8b6ef29d7527915611be0b96a9cd039bc75bb0a9
Signed-off-by: Shaoyun Liu <Shaoyun.Liu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 78b7d39..90a37ed 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3231,12 +3231,11 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
 		/* bad news, how to tell it to userspace ? */
 		dev_info(adev->dev, "GPU reset(%d) failed\n", atomic_read(&adev->gpu_reset_counter));
 		amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r);
-	} else {
+	} else
 		dev_info(adev->dev, "GPU reset(%d) successed!\n",atomic_read(&adev->gpu_reset_counter));
-		/*unlock kfd after a successfully recovery*/
-		amdgpu_amdkfd_post_reset(adev);
-	}
 
+	/*unlock kfd */
+	amdgpu_amdkfd_post_reset(adev);
 	amdgpu_vf_error_trans_all(adev);
 	adev->in_gpu_reset = 0;
 	mutex_unlock(&adev->lock_reset);
-- 
1.9.1



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux