From: Arvind Yadav <arvind.yadav@xxxxxxx> This patch adds 20 ms of busy-waiting delay after mapping the usermode queue in MES HW. It was observed during the testing that this delay is required for expected results. Cc: Alex Deucher <alexander.deucher@xxxxxxx> Cc: Christian König <christian.koenig@xxxxxxx> Cc: Shashank Sharma <shashank.sharma@xxxxxxx> Signed-off-by: Arvind Yadav <arvind.yadav@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c index cbfe2608c040..a28ed8e98f7b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c @@ -24,6 +24,15 @@ #include "amdgpu.h" #include "amdgpu_vm.h" +static inline void userqueue_busy_wait(unsigned long ms) +{ + unsigned long start = jiffies; + unsigned long timeout = start + ms; + while(time_before(jiffies, timeout)) { + + } +} + static inline int amdgpu_userqueue_index(struct amdgpu_userq_mgr *uq_mgr, struct amdgpu_usermode_queue *queue) { @@ -85,6 +94,7 @@ amdgpu_userqueue_map(struct amdgpu_userq_mgr *uq_mgr, return r; } + userqueue_busy_wait(20); DRM_DEBUG_DRIVER("Queue %d mapped successfully\n", queue->queue_id); return 0; } -- 2.34.1