diff options
author | Christian König <christian.koenig@amd.com> | 2018-10-25 11:37:02 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-11-05 23:49:39 +0300 |
commit | 5c76c6a8975e1d074dc5763d3f46c928bc7d6484 (patch) | |
tree | 186f337d35fe476b9de971064aba49d2c8be0bfa /drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | |
parent | 788012e33cb4ba7eedae6b621f0fa27f9196f2d0 (diff) | |
download | linux-5c76c6a8975e1d074dc5763d3f46c928bc7d6484.tar.xz |
drm/amdgpu: remove nonsense in_interrupt() checks
might_sleep() is supposed to raise if warning if called in interrupt or
atomic context.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emily Deng <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c index cca794a1f8ba..ff887639bfa3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c @@ -70,9 +70,7 @@ uint32_t amdgpu_virt_kiq_rreg(struct amdgpu_device *adev, uint32_t reg) if (r < 1 && (adev->in_gpu_reset || in_interrupt())) goto failed_kiq_read; - if (in_interrupt()) - might_sleep(); - + 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); @@ -118,9 +116,7 @@ void amdgpu_virt_kiq_wreg(struct amdgpu_device *adev, uint32_t reg, uint32_t v) if (r < 1 && (adev->in_gpu_reset || in_interrupt())) goto failed_kiq_write; - if (in_interrupt()) - might_sleep(); - + might_sleep(); while (r < 1 && cnt++ < MAX_KIQ_REG_TRY) { msleep(MAX_KIQ_REG_BAILOUT_INTERVAL); |