[PATCH 1/4] drm/amdgpu: remove nonsense in_interrupt() checks
Deng, Emily
Emily.Deng at amd.com
Thu Oct 25 09:39:38 UTC 2018
Add Wentao.
Best wishes
Emily Deng
>-----Original Message-----
>From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of
>Christian König
>Sent: Thursday, October 25, 2018 5:15 PM
>To: amd-gfx at lists.freedesktop.org
>Subject: [PATCH 1/4] 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 at amd.com>
>---
> drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 8 ++------
> 1 file 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 f2f358aa0597..8f50bc245dd6 100644
>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
>@@ -162,9 +162,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); @@ -210,9 +208,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);
>--
>2.14.1
>
>_______________________________________________
>amd-gfx mailing list
>amd-gfx at lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list