[PATCH v5 10/10] drm/amdgpu: add delay after userqueue mapping

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

 



It has been observed that the MES FW needs 250-300us to map the gfx
userqueue, and if the user rings the doorbell before this duration,
the FW never recognizes the work. This patch adds the delay of 300
us after the queue mapping.

V1: Moved the delay from userspace IOCTL to kernel (Alex).

Cc: Alex Deucher <alexander.deucher@xxxxxxx>
Cc: Christian Koenig <christian.koenig@xxxxxxx>
Signed-off-by: Shashank Sharma <shashank.sharma@xxxxxxx>
Signed-off-by: Arvind Yadav <arvind.yadav@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index 8edb020683a1..78b58c5d0fd8 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -25,6 +25,7 @@
 #include <linux/firmware.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/delay.h>
 #include "amdgpu.h"
 #include "amdgpu_gfx.h"
 #include "amdgpu_psp.h"
@@ -6749,6 +6750,12 @@ static int gfx_v11_0_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr,
 		goto free_ctx;
 	}
 
+	/*
+	 * It has been observed that HWS needs appx 250-300us to map the queue, and the
+	 * user needs to wait this duration before ringing the doorbell, or else the FW
+	 * will never recognize the work.
+	 */
+	udelay(300);
 	return 0;
 
 free_ctx:
-- 
2.40.1




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

  Powered by Linux