]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/radeon/r600: use fence->timeout directly
authorAlex Deucher <alexdeucher@gmail.com>
Tue, 8 Sep 2009 18:45:05 +0000 (14:45 -0400)
committerDave Airlie <airlied@linux.ie>
Tue, 8 Sep 2009 22:17:57 +0000 (08:17 +1000)
Fixes fence timeouts on r6xx/r7xx.  Noticed by
taiu on IRC.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
drivers/gpu/drm/radeon/radeon_fence.c

index 01a89633e2659f0dba8f48098ed4e6de947e9451..3beb26d747196b74700c08e2cb51a324868581bf 100644 (file)
@@ -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;
                }