summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-04-16 16:23:05 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-04-16 16:23:05 +0200
commite6e4946c82ab6f63143df7f49f38fa56f7e8980a (patch)
treea6c5157a02295e60c4daea928783c35462618803 /libdrm
parent9b7211dd6793dc62d11ad1ae980b22fa2d61f9dd (diff)
Require the hardware lock for buffer creation
(since that implies a validate). Fix drm_bo_wait_unfenced error messages and codes. Fix some return codes from libdrm.
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index a815ed7a..2473162b 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -2814,7 +2814,7 @@ int drmBOMap(int fd, drmBO *buf, unsigned mapFlags, unsigned mapHint,
} while (ret != 0 && errno == EAGAIN);
if (ret)
- return ret;
+ return -errno;
if (!arg.handled)
return -EFAULT;
if (rep->ret)
@@ -2870,7 +2870,7 @@ int drmBOValidate(int fd, drmBO *buf, unsigned flags, unsigned mask,
} while (ret && errno == EAGAIN);
if (ret)
- return ret;
+ return -errno;
if (!arg.handled)
return -EFAULT;
if (rep->ret)
@@ -2897,7 +2897,7 @@ int drmBOFence(int fd, drmBO *buf, unsigned flags, unsigned fenceHandle)
ret = ioctl(fd, DRM_IOCTL_BUFOBJ, &arg);
if (ret)
- return ret;
+ return -errno;
if (!arg.handled)
return -EFAULT;
if (rep->ret)
@@ -2919,7 +2919,7 @@ int drmBOInfo(int fd, drmBO *buf)
ret = ioctl(fd, DRM_IOCTL_BUFOBJ, &arg);
if (ret)
- return ret;
+ return -errno;
if (!arg.handled)
return -EFAULT;
if (rep->ret)
@@ -2947,7 +2947,7 @@ int drmBOWaitIdle(int fd, drmBO *buf, unsigned hint)
} while (ret && errno == EAGAIN);
if (ret)
- return ret;
+ return -errno;
if (!arg.handled)
return -EFAULT;
if (rep->ret)
@@ -3199,7 +3199,7 @@ int drmMMLock(int fd, unsigned memType)
ret = ioctl(fd, DRM_IOCTL_MM_INIT, &arg);
} while (ret && errno == EAGAIN);
- return ret;
+ return -errno;
}
int drmMMUnlock(int fd, unsigned memType)
@@ -3215,7 +3215,7 @@ int drmMMUnlock(int fd, unsigned memType)
ret = ioctl(fd, DRM_IOCTL_MM_INIT, &arg);
} while (ret && errno == EAGAIN);
- return ret;
+ return -errno;
}
#define DRM_MAX_FDS 16