summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-01-04 17:37:18 -0800
committerEric Anholt <eric@anholt.net>2009-01-14 16:12:08 -0800
commit02445eab6432709abe2b06020c014be527d58ead (patch)
tree9bbcbee4d285351ebb6d4b67949090c5fb15d631
parent65b90fb37744fdd335c59fdc70079fa058301858 (diff)
intel: Retry pin ioctl on -EINTR.
-rw-r--r--libdrm/intel/intel_bufmgr_gem.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c
index c510e5eb..7b821de8 100644
--- a/libdrm/intel/intel_bufmgr_gem.c
+++ b/libdrm/intel/intel_bufmgr_gem.c
@@ -999,7 +999,10 @@ drm_intel_gem_bo_pin(drm_intel_bo *bo, uint32_t alignment)
pin.handle = bo_gem->gem_handle;
pin.alignment = alignment;
- ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_PIN, &pin);
+ do {
+ ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_PIN, &pin);
+ } while (ret == -1 && errno == EINTR);
+
if (ret != 0)
return -errno;