diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2016-06-30 16:44:41 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 15:06:14 -0400 |
commit | a3c47d6bdc34a74179e4794d75a578e71f14a1f8 (patch) | |
tree | f55a4bc02639eda71ec47e1c088b57bf9281c22e | |
parent | e686e75dacb262a7d5f6673e1b9bfe0e62cd287a (diff) | |
download | linux-a3c47d6bdc34a74179e4794d75a578e71f14a1f8.tar.gz linux-a3c47d6bdc34a74179e4794d75a578e71f14a1f8.tar.bz2 linux-a3c47d6bdc34a74179e4794d75a578e71f14a1f8.zip |
drm/amdgpu: block ttm first before parking scheduler
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 36d00b20afa0..1f6121a2a94b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1936,6 +1936,9 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) atomic_inc(&adev->gpu_reset_counter); + /* block TTM */ + resched = ttm_bo_lock_delayed_workqueue(&adev->mman.bdev); + /* block scheduler */ for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { struct amdgpu_ring *ring = adev->rings[i]; @@ -1945,8 +1948,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) kthread_park(ring->sched.thread); } - /* block TTM */ - resched = ttm_bo_lock_delayed_workqueue(&adev->mman.bdev); /* save scratch */ amdgpu_atombios_scratch_regs_save(adev); |