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

drm/amdgpu: wait interruptible when semaphores are disabled v2

Otherwise debugging locked up processes isn't possible.

v2: rebased

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)

authored by

Christian König and committed by
Alex Deucher
680513cc 43c27fb5

+8 -2
+8 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
··· 302 302 return -EINVAL; 303 303 } 304 304 305 - if (amdgpu_enable_scheduler || !amdgpu_enable_semaphores || 306 - (count >= AMDGPU_NUM_SYNCS)) { 305 + if (amdgpu_enable_scheduler || !amdgpu_enable_semaphores) { 306 + r = fence_wait(&fence->base, true); 307 + if (r) 308 + return r; 309 + continue; 310 + } 311 + 312 + if (count >= AMDGPU_NUM_SYNCS) { 307 313 /* not enough room, wait manually */ 308 314 r = fence_wait(&fence->base, false); 309 315 if (r)