]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/amdgpu: block ttm first before parking scheduler
authorChunming Zhou <David1.Zhou@amd.com>
Thu, 30 Jun 2016 08:44:41 +0000 (16:44 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 7 Jul 2016 19:06:14 +0000 (15:06 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 36d00b20afa0bb05551c0cbb7db3e4ab202f51fd..1f6121a2a94b50db5002f51b8df70cdfb7e5126e 100644 (file)
@@ -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);