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: keeping waiting userq fence infinitely

Keeping waiting the userq fence infinitely until
hang detection, and then suspend the hang queue and
set the fence error.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Prike Liang and committed by
Alex Deucher
873f44c3 2a28f966

+9 -4
+9 -4
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
··· 213 213 return r; 214 214 } 215 215 216 - static void 216 + static int 217 217 amdgpu_userq_wait_for_last_fence(struct amdgpu_userq_mgr *uq_mgr, 218 218 struct amdgpu_usermode_queue *queue) 219 219 { 220 220 struct dma_fence *f = queue->last_fence; 221 - int ret; 221 + int ret = 0; 222 222 223 223 if (f && !dma_fence_is_signaled(f)) { 224 - ret = dma_fence_wait_timeout(f, true, msecs_to_jiffies(100)); 225 - if (ret <= 0) 224 + ret = dma_fence_wait_timeout(f, true, MAX_SCHEDULE_TIMEOUT); 225 + if (ret <= 0) { 226 226 drm_file_err(uq_mgr->file, "Timed out waiting for fence=%llu:%llu\n", 227 227 f->context, f->seqno); 228 + queue->state = AMDGPU_USERQ_STATE_HUNG; 229 + return -ETIME; 230 + } 228 231 } 232 + 233 + return ret; 229 234 } 230 235 231 236 static void