From: Dave Airlie Date: Tue, 8 Sep 2009 04:38:45 +0000 (+1000) Subject: drm/radeon/kms: don't allow ERESTART to hit userspace. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c746e205f2fb6f74b4a622382607f065eca5eb49;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/radeon/kms: don't allow ERESTART to hit userspace. 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 --- diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c index 506dd4dd3a24..01a89633e265 100644 --- a/drivers/gpu/drm/radeon/radeon_fence.c +++ b/drivers/gpu/drm/radeon/radeon_fence.c @@ -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; } } @@ -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;