aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2015-09-10 13:03:50 +0000
committerAlex Deucher <[email protected]>2015-11-16 22:01:15 +0000
commit680513cc0accf14cb447663b65e02ae307ac3811 (patch)
tree8eab027f6d3b7bd1823481cd3bc9523cf55a91d5 /drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
parentdrm/amdgpu: update pd while updating vm as well (diff)
downloadkernel-680513cc0accf14cb447663b65e02ae307ac3811.tar.gz
kernel-680513cc0accf14cb447663b65e02ae307ac3811.zip
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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v1)
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
index a6697fd05217..dd005c336c97 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
@@ -302,8 +302,14 @@ int amdgpu_sync_rings(struct amdgpu_sync *sync,
return -EINVAL;
}
- if (amdgpu_enable_scheduler || !amdgpu_enable_semaphores ||
- (count >= AMDGPU_NUM_SYNCS)) {
+ if (amdgpu_enable_scheduler || !amdgpu_enable_semaphores) {
+ r = fence_wait(&fence->base, true);
+ if (r)
+ return r;
+ continue;
+ }
+
+ if (count >= AMDGPU_NUM_SYNCS) {
/* not enough room, wait manually */
r = fence_wait(&fence->base, false);
if (r)