drm/radeon/kms: allow interruptible waits for objects.
authorDave Airlie <airlied@redhat.com>
Fri, 24 Jul 2009 03:47:45 +0000 (13:47 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 29 Jul 2009 05:59:49 +0000 (15:59 +1000)
Blocking here isn't something the X server mouse appreciates,
avoid the block and let userspace retry the waits.

libdrm_radeon userspace library is also expecting EBUSY not ERESTART

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_fence.c
drivers/gpu/drm/radeon/radeon_object.c

index 96afbf5ae2ad7601b1667d54b49c6bba653b2914..b4e48dd2e859c056d8280121f44c2e376070747f 100644 (file)
@@ -195,7 +195,7 @@ retry:
                r = wait_event_interruptible_timeout(rdev->fence_drv.queue,
                                radeon_fence_signaled(fence), timeout);
                if (unlikely(r == -ERESTARTSYS)) {
-                       return -ERESTART;
+                       return -EBUSY;
                }
        } else {
                r = wait_event_timeout(rdev->fence_drv.queue,
index 81573c3a9b435e0218daee80c5bbcb9e8c04454c..dd9ac2fed6d69512f8696294a6ec1f062e22f250 100644 (file)
@@ -309,7 +309,7 @@ int radeon_object_wait(struct radeon_object *robj)
        }
        spin_lock(&robj->tobj.lock);
        if (robj->tobj.sync_obj) {
-               r = ttm_bo_wait(&robj->tobj, true, false, false);
+               r = ttm_bo_wait(&robj->tobj, true, true, false);
        }
        spin_unlock(&robj->tobj.lock);
        radeon_object_unreserve(robj);