From 721529b5780dd40d2d27310c69ae2615a878221c Mon Sep 17 00:00:00 2001 From: Christian König 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(+) (limited to 'drivers/gpu/drm/radeon/radeon_fence.c') 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) -- cgit v1.2.3