summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
diff options
context:
space:
mode:
authorDennis Li <Dennis.Li@amd.com>2020-08-19 17:23:03 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-08-24 12:22:56 -0400
commit53b3f8f40e6cff36ae12b11e6d6b308af3c7e53f (patch)
tree865f5a2a0f2d69a04dbceb1853672ceef77dcb53 /drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
parentc9977dffcc7e0f728e82209c140991c5bd27c491 (diff)
downloadlinux-53b3f8f40e6cff36ae12b11e6d6b308af3c7e53f.tar.gz
linux-53b3f8f40e6cff36ae12b11e6d6b308af3c7e53f.tar.bz2
linux-53b3f8f40e6cff36ae12b11e6d6b308af3c7e53f.zip
drm/amdgpu: refine codes to avoid reentering GPU recovery
if other threads have holden the reset lock, recovery will fail to try_lock. Therefore we introduce atomic hive->in_reset and adev->in_gpu_reset, to avoid reentering GPU recovery. v2: drop "? true : false" in the definition of amdgpu_in_reset Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Dennis Li <Dennis.Li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
index a755f63514e1..d08839d9491f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
@@ -552,7 +552,7 @@ int kgd_gfx_v9_hqd_destroy(struct kgd_dev *kgd, void *mqd,
uint32_t temp;
struct v9_mqd *m = get_mqd(mqd);
- if (adev->in_gpu_reset)
+ if (amdgpu_in_reset(adev))
return -EIO;
acquire_queue(kgd, pipe_id, queue_id);