diff options
author | Thomas Hellstrom <thomas@tungstengraphics.com> | 2006-03-17 16:48:22 +0000 |
---|---|---|
committer | Thomas Hellstrom <thomas@tungstengraphics.com> | 2006-03-17 16:48:22 +0000 |
commit | 364321f166c58a81e75563a39272b97aef1469aa (patch) | |
tree | a282a63f5b7bf8ba462d4013d04544e04fd9ae82 /libdrm/xf86mm.c | |
parent | 6329fc3733e72690160cbfa2e317deeef85adb1c (diff) |
Handle signals correctly while waiting for fence.
Diffstat (limited to 'libdrm/xf86mm.c')
-rw-r--r-- | libdrm/xf86mm.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libdrm/xf86mm.c b/libdrm/xf86mm.c index b25bcc85..ec0cc682 100644 --- a/libdrm/xf86mm.c +++ b/libdrm/xf86mm.c @@ -249,6 +249,7 @@ drmWaitFence(int drmFD, drmFence fence) { drm_fence_arg_t arg; int retired; + int ret; drmMMCheckInit(drmFD); @@ -268,13 +269,16 @@ drmWaitFence(int drmFD, drmFence fence) fence.fenceSeq) < DRM_MM_WRAP) return 0; #endif - arg.req.op = wait_fence; - arg.req.fence_type = fence.fenceType; - arg.req.fence_seq = fence.fenceSeq; - if (ioctl(drmFD, DRM_IOCTL_FENCE, &arg)) { - drmMsg("drmWaitFence: failed: %s\n", strerror(errno)); + do { + arg.req.op = wait_fence; + arg.req.fence_type = fence.fenceType; + arg.req.fence_seq = fence.fenceSeq; + ret = ioctl(drmFD, DRM_IOCTL_FENCE, &arg); + } while (ret == -EAGAIN); + if (ret) { + drmMsg("drmWaitFence: failed: %s\n", strerror(errno)); return -errno; } @@ -888,7 +892,6 @@ drmMMValidateBuffers(int drmFD, drmMMBufList * head) buf->err = curBArg->ret; if (buf->err) { ret = buf->err; - abort(); } block->kernelBuf = curBArg->region_handle; block->hasKernelBuf = 1; |