Don't use kiq interrupt, as it might sleep. Signed-off-by: Emily Deng <Emily.Deng at amd.com> --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index fcdbacb..f49f5f3 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -331,12 +331,6 @@ signed long amdgpu_kiq_reg_write_reg_wait(struct amdgpu_device *adev, r = amdgpu_fence_wait_polling(ring, seq, MAX_KIQ_REG_WAIT); - /* don't wait anymore for IRQ context */ - if (r < 1 && in_interrupt()) - goto failed_kiq; - - might_sleep(); - while (r < 1 && cnt++ < MAX_KIQ_REG_TRY) { msleep(MAX_KIQ_REG_BAILOUT_INTERVAL); r = amdgpu_fence_wait_polling(ring, seq, MAX_KIQ_REG_WAIT); @@ -381,7 +375,8 @@ static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev, if (adev->gfx.kiq.ring.ready && (amdgpu_sriov_runtime(adev) || !amdgpu_sriov_vf(adev)) && - !adev->in_gpu_reset) { + !adev->in_gpu_reset && + !in_interrupt()) { r = amdgpu_kiq_reg_write_reg_wait(adev, hub->vm_inv_eng0_req + eng, hub->vm_inv_eng0_ack + eng, tmp, 1 << vmid); if (!r) -- 2.7.4