]> git.ipfire.org Git - people/ms/linux.git/commitdiff
drm/amdgpu: wait interruptible when semaphores are disabled v2
authorChristian König <christian.koenig@amd.com>
Thu, 10 Sep 2015 13:03:50 +0000 (15:03 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 16 Nov 2015 22:01:15 +0000 (17:01 -0500)
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)
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c

index a6697fd0521713cd9f60cbd7a2508b02e954b470..dd005c336c974ad708827c25edc4a4534772bb2c 100644 (file)
@@ -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)