From: Chunming Zhou Date: Thu, 30 Jun 2016 08:44:41 +0000 (+0800) Subject: drm/amdgpu: block ttm first before parking scheduler X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a3c47d6bdc34a74179e4794d75a578e71f14a1f8;p=linux-beck.git drm/amdgpu: block ttm first before parking scheduler Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher --- 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);