From 721529b5780dd40d2d27310c69ae2615a878221c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Tue, 5 Nov 2013 14:09:54 +0100 Subject: drm/radeon: fix radeon_fence_wait_empty_locked MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't block forever if there is nothing to wait for. Signed-off-by: Christian König Tested-by: Rafa? Mi?ecki Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon_fence.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c index b8f68b2..281d14c 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) -- cgit v1.1