RE: [PATCH 1/4] drm/amdgpu: remove nonsense in_interrupt() checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add Wentao.

Best wishes
Emily Deng



>-----Original Message-----
>From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of
>Christian König
>Sent: Thursday, October 25, 2018 5:15 PM
>To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
>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@xxxxxxx>
>---
> 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@xxxxxxxxxxxxxxxxxxxxx
>https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux