Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu/userq: use dma_fence_wait_timeout without test for signalled

In function amdgpu_userq_wait_for_last_fence use
dma_fence_wait to wait infinitely.

Also there is no need to print error as we wont be
timing out anymore.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Sunil Khatri and committed by
Alex Deucher
05ce4441 38476bde

+4 -13
+4 -13
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
··· 427 427 return r; 428 428 } 429 429 430 - static int amdgpu_userq_wait_for_last_fence(struct amdgpu_usermode_queue *queue) 430 + static void amdgpu_userq_wait_for_last_fence(struct amdgpu_usermode_queue *queue) 431 431 { 432 - struct amdgpu_userq_mgr *uq_mgr = queue->userq_mgr; 433 432 struct dma_fence *f = queue->last_fence; 434 - int ret = 0; 435 433 436 - if (f && !dma_fence_is_signaled(f)) { 437 - ret = dma_fence_wait_timeout(f, true, MAX_SCHEDULE_TIMEOUT); 438 - if (ret <= 0) { 439 - drm_file_err(uq_mgr->file, "Timed out waiting for fence=%llu:%llu\n", 440 - f->context, f->seqno); 441 - queue->state = AMDGPU_USERQ_STATE_HUNG; 442 - return -ETIME; 443 - } 444 - } 434 + if (!f) 435 + return; 445 436 446 - return ret; 437 + dma_fence_wait(f, false); 447 438 } 448 439 449 440 static void amdgpu_userq_cleanup(struct amdgpu_usermode_queue *queue)