Skip to content

Commit

Permalink
drm/radeon/kms: don't allow ERESTART to hit userspace.
Browse files Browse the repository at this point in the history
the pre-r600 fence code returns ebusy if we get hit by a signal
so we should continue to do that.

Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dave Airlie authored and Dave Airlie committed Sep 8, 2009
1 parent 620f378 commit c746e20
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/gpu/drm/radeon/radeon_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ int r600_fence_wait(struct radeon_fence *fence, bool intr, bool lazy)
schedule_timeout(1);

if (intr && signal_pending(current)) {
ret = -ERESTART;
ret = -ERESTARTSYS;
break;
}
}
Expand All @@ -225,8 +225,12 @@ int radeon_fence_wait(struct radeon_fence *fence, bool intr)
return 0;
}

if (rdev->family >= CHIP_R600)
return r600_fence_wait(fence, intr, 0);
if (rdev->family >= CHIP_R600) {
r = r600_fence_wait(fence, intr, 0);
if (r == -ERESTARTSYS)
return -EBUSY;
return r;
}

retry:
cur_jiffies = jiffies;
Expand Down

0 comments on commit c746e20

Please sign in to comment.