From: Christian König Date: Tue, 5 Nov 2013 13:09:54 +0000 (+0100) Subject: drm/radeon: fix radeon_fence_wait_empty_locked X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=721529b5780dd40d2d27310c69ae2615a878221c;p=openwrt%2Fstaging%2Fblogic.git 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 Tested-by: Rafa? Mi?ecki Signed-off-by: Dave Airlie --- 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)