drm/amdgpu: remove nonsense in_interrupt() checks
authorChristian König <christian.koenig@amd.com>
Thu, 25 Oct 2018 08:37:02 +0000 (10:37 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Nov 2018 20:49:39 +0000 (15:49 -0500)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c

index cca794a..ff88763 100644 (file)
@@ -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);