aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorEmily Deng <Emily.Deng@amd.com>2018-08-22 08:32:23 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-08-27 12:11:14 -0400
commitae74da3e145198dfb766c7beddd473fad2fb2a5b (patch)
tree845b3ff471df7d95a6164a2558921e0668b662f1 /drivers/gpu/drm/amd/amdgpu
parentc89677afb30582f16d7378a324e3e3f1c07e69b2 (diff)
drm/amdgpu: Don't use kiq in gpu reset
When in gpu reset, don't use kiq, it will generate more TDR. Signed-off-by: Emily Deng <Emily.Deng@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index b6b5ede0ca35..6763570c0321 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -332,15 +332,8 @@ signed long amdgpu_kiq_reg_write_reg_wait(struct amdgpu_device *adev,
332 332
333 r = amdgpu_fence_wait_polling(ring, seq, MAX_KIQ_REG_WAIT); 333 r = amdgpu_fence_wait_polling(ring, seq, MAX_KIQ_REG_WAIT);
334 334
335 /* don't wait anymore for gpu reset case because this way may 335 /* don't wait anymore for IRQ context */
336 * block gpu_recover() routine forever, e.g. this virt_kiq_rreg 336 if (r < 1 && in_interrupt())
337 * is triggered in TTM and ttm_bo_lock_delayed_workqueue() will
338 * never return if we keep waiting in virt_kiq_rreg, which cause
339 * gpu_recover() hang there.
340 *
341 * also don't wait anymore for IRQ context
342 * */
343 if (r < 1 && (adev->in_gpu_reset || in_interrupt()))
344 goto failed_kiq; 337 goto failed_kiq;
345 338
346 might_sleep(); 339 might_sleep();
@@ -388,8 +381,8 @@ static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev,
388 u32 tmp = gmc_v9_0_get_invalidate_req(vmid); 381 u32 tmp = gmc_v9_0_get_invalidate_req(vmid);
389 382
390 if (adev->gfx.kiq.ring.ready && 383 if (adev->gfx.kiq.ring.ready &&
391 (amdgpu_sriov_runtime(adev) || 384 (amdgpu_sriov_runtime(adev) || !amdgpu_sriov_vf(adev)) &&
392 !amdgpu_sriov_vf(adev))) { 385 !adev->in_gpu_reset) {
393 r = amdgpu_kiq_reg_write_reg_wait(adev, hub->vm_inv_eng0_req + eng, 386 r = amdgpu_kiq_reg_write_reg_wait(adev, hub->vm_inv_eng0_req + eng,
394 hub->vm_inv_eng0_ack + eng, tmp, 1 << vmid); 387 hub->vm_inv_eng0_ack + eng, tmp, 1 << vmid);
395 if (!r) 388 if (!r)