summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm2/radeon
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/drm2/radeon')
-rw-r--r--sys/dev/drm2/radeon/radeon_fence.c8
-rw-r--r--sys/dev/drm2/radeon/radeon_sa.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/drm2/radeon/radeon_fence.c b/sys/dev/drm2/radeon/radeon_fence.c
index 07b1a64..3b43a8c 100644
--- a/sys/dev/drm2/radeon/radeon_fence.c
+++ b/sys/dev/drm2/radeon/radeon_fence.c
@@ -321,6 +321,8 @@ static int radeon_fence_wait_seq(struct radeon_device *rdev, u64 target_seq,
&rdev->fence_queue_mtx,
timeout);
}
+ if (r == EINTR)
+ r = ERESTARTSYS;
if (r != 0) {
if (r == EWOULDBLOCK) {
signaled =
@@ -334,7 +336,7 @@ static int radeon_fence_wait_seq(struct radeon_device *rdev, u64 target_seq,
mtx_unlock(&rdev->fence_queue_mtx);
}
radeon_irq_kms_sw_irq_put(rdev, ring);
- if (unlikely(r == EINTR || r == ERESTART)) {
+ if (unlikely(r == ERESTARTSYS)) {
return -r;
}
CTR2(KTR_DRM, "radeon fence: wait end (ring=%d, seq=%d)",
@@ -514,6 +516,8 @@ static int radeon_fence_wait_any_seq(struct radeon_device *rdev,
&rdev->fence_queue_mtx,
timeout);
}
+ if (r == EINTR)
+ r = ERESTARTSYS;
if (r != 0) {
if (r == EWOULDBLOCK) {
signaled =
@@ -531,7 +535,7 @@ static int radeon_fence_wait_any_seq(struct radeon_device *rdev,
radeon_irq_kms_sw_irq_put(rdev, i);
}
}
- if (unlikely(r == EINTR || r == ERESTART)) {
+ if (unlikely(r == ERESTARTSYS)) {
return -r;
}
CTR2(KTR_DRM, "radeon fence: wait end (ring=%d, target_seq=%d)",
diff --git a/sys/dev/drm2/radeon/radeon_sa.c b/sys/dev/drm2/radeon/radeon_sa.c
index e750812..25695a4 100644
--- a/sys/dev/drm2/radeon/radeon_sa.c
+++ b/sys/dev/drm2/radeon/radeon_sa.c
@@ -363,6 +363,8 @@ int radeon_sa_bo_new(struct radeon_device *rdev,
while (!radeon_sa_event(sa_manager, size, align)) {
r = -cv_wait_sig(&sa_manager->wq,
&sa_manager->wq_lock);
+ if (r == -EINTR)
+ r = -ERESTARTSYS;
if (r != 0)
break;
}
OpenPOWER on IntegriCloud