aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-09-08 14:45:05 -0400
committerDave Airlie <airlied@linux.ie>2009-09-09 08:17:57 +1000
commitcecc6b63a5de547a345c491bb4c18c01a15984a4 (patch)
tree6092e559358347c5db904dec4070a9c2812704d1
parent60d15f551abdbc5fef70d85f55aac1e85950bf59 (diff)
drm/radeon/r600: use fence->timeout directly
Fixes fence timeouts on r6xx/r7xx. Noticed by taiu on IRC. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon_fence.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index 01a89633e26..3beb26d7471 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -171,17 +171,8 @@ bool radeon_fence_signaled(struct radeon_fence *fence)
int r600_fence_wait(struct radeon_fence *fence, bool intr, bool lazy)
{
struct radeon_device *rdev;
- unsigned long cur_jiffies;
- unsigned long timeout;
int ret = 0;
- cur_jiffies = jiffies;
- timeout = HZ / 100;
-
- if (time_after(fence->timeout, cur_jiffies)) {
- timeout = fence->timeout - cur_jiffies;
- }
-
rdev = fence->rdev;
__set_current_state(intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE);
@@ -190,7 +181,7 @@ int r600_fence_wait(struct radeon_fence *fence, bool intr, bool lazy)
if (radeon_fence_signaled(fence))
break;
- if (time_after_eq(jiffies, timeout)) {
+ if (time_after_eq(jiffies, fence->timeout)) {
ret = -EBUSY;
break;
}