Commit a3c47d6b authored by Chunming Zhou's avatar Chunming Zhou Committed by Alex Deucher

drm/amdgpu: block ttm first before parking scheduler

Signed-off-by: default avatarChunming Zhou <David1.Zhou@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e686e75d
...@@ -1936,6 +1936,9 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) ...@@ -1936,6 +1936,9 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
atomic_inc(&adev->gpu_reset_counter); atomic_inc(&adev->gpu_reset_counter);
/* block TTM */
resched = ttm_bo_lock_delayed_workqueue(&adev->mman.bdev);
/* block scheduler */ /* block scheduler */
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
struct amdgpu_ring *ring = adev->rings[i]; struct amdgpu_ring *ring = adev->rings[i];
...@@ -1945,8 +1948,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) ...@@ -1945,8 +1948,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
kthread_park(ring->sched.thread); kthread_park(ring->sched.thread);
} }
/* block TTM */
resched = ttm_bo_lock_delayed_workqueue(&adev->mman.bdev);
/* save scratch */ /* save scratch */
amdgpu_atombios_scratch_regs_save(adev); amdgpu_atombios_scratch_regs_save(adev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment