summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2013-11-05 14:09:54 +0100
committerDave Airlie <airlied@redhat.com>2013-11-06 04:40:59 +0100
commit721529b5780dd40d2d27310c69ae2615a878221c (patch)
treea495e9082d2a3f8259ac8381646748e40eedf2cb
parentdrm/qxl: add some surface memory logging (diff)
downloadlinux-721529b5780dd40d2d27310c69ae2615a878221c.tar.xz
linux-721529b5780dd40d2d27310c69ae2615a878221c.zip
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>
-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)