summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_fence.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2013-11-05 17:09:54 +0400
committerDave Airlie <airlied@redhat.com>2013-11-06 07:40:59 +0400
commit721529b5780dd40d2d27310c69ae2615a878221c (patch)
treea495e9082d2a3f8259ac8381646748e40eedf2cb /drivers/gpu/drm/radeon/radeon_fence.c
parentd9bbf1895f354c8641824e1dd10d0501efd34790 (diff)
downloadlinux-721529b5780dd40d2d27310c69ae2615a878221c.tar.xz
drm/radeon: fix radeon_fence_wait_empty_locked
Don't block forever if there is nothing to wait for. Signed-off-by: Christian König <christian.koenig@amd.com> Tested-by: Rafa? Mi?ecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_fence.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_fence.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index b8f68b2c47d4..281d14c22a47 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -510,6 +510,9 @@ int radeon_fence_wait_empty_locked(struct radeon_device *rdev, int ring)
int r;
seq[ring] = rdev->fence_drv[ring].sync_seq[ring];
+ if (!seq[ring])
+ return 0;
+
r = radeon_fence_wait_seq(rdev, seq, false, false);
if (r) {
if (r == -EDEADLK)