提交 cecc6b63 编写于 作者: A Alex Deucher 提交者: Dave Airlie

drm/radeon/r600: use fence->timeout directly

Fixes fence timeouts on r6xx/r7xx.  Noticed by
taiu on IRC.
Signed-off-by: NAlex Deucher <alexdeucher@gmail.com>
上级 60d15f55
...@@ -171,17 +171,8 @@ bool radeon_fence_signaled(struct radeon_fence *fence) ...@@ -171,17 +171,8 @@ bool radeon_fence_signaled(struct radeon_fence *fence)
int r600_fence_wait(struct radeon_fence *fence, bool intr, bool lazy) int r600_fence_wait(struct radeon_fence *fence, bool intr, bool lazy)
{ {
struct radeon_device *rdev; struct radeon_device *rdev;
unsigned long cur_jiffies;
unsigned long timeout;
int ret = 0; int ret = 0;
cur_jiffies = jiffies;
timeout = HZ / 100;
if (time_after(fence->timeout, cur_jiffies)) {
timeout = fence->timeout - cur_jiffies;
}
rdev = fence->rdev; rdev = fence->rdev;
__set_current_state(intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE); __set_current_state(intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE);
...@@ -190,7 +181,7 @@ int r600_fence_wait(struct radeon_fence *fence, bool intr, bool lazy) ...@@ -190,7 +181,7 @@ int r600_fence_wait(struct radeon_fence *fence, bool intr, bool lazy)
if (radeon_fence_signaled(fence)) if (radeon_fence_signaled(fence))
break; break;
if (time_after_eq(jiffies, timeout)) { if (time_after_eq(jiffies, fence->timeout)) {
ret = -EBUSY; ret = -EBUSY;
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册