aboutsummaryrefslogtreecommitdiff
path: root/libdrm/xf86drm.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-10-20 16:49:43 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-10-20 16:49:43 +0200
commit48b5eaf303b60077faed09db77785d7a544ac335 (patch)
tree1955b5a01288f33e3e4e0bca8fc2de863c39b126 /libdrm/xf86drm.c
parentc0e3537e77f1765001f665f93e5349ccd0f1d092 (diff)
Simple replacement for hardware lock in some cases.
Fix i915 since last commit.
Diffstat (limited to 'libdrm/xf86drm.c')
-rw-r--r--libdrm/xf86drm.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index a8e054d9..b61c2250 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -2815,13 +2815,19 @@ int drmMMTakedown(int fd, unsigned memType)
return 0;
}
-int drmMMLock(int fd, unsigned memType)
+/*
+ * If this function returns an error, and lockBM was set to 1,
+ * the buffer manager is NOT locked.
+ */
+
+int drmMMLock(int fd, unsigned memType, int lockBM)
{
struct drm_mm_type_arg arg;
int ret;
memset(&arg, 0, sizeof(arg));
arg.mem_type = memType;
+ arg.lock_unlock_bm = lock_bm;
do{
ret = ioctl(fd, DRM_IOCTL_MM_LOCK, &arg);
@@ -2830,7 +2836,7 @@ int drmMMLock(int fd, unsigned memType)
return (ret) ? -errno : 0;
}
-int drmMMUnlock(int fd, unsigned memType)
+int drmMMUnlock(int fd, unsigned memType, int unlockBM)
{
struct drm_mm_type_arg arg;
int ret;
@@ -2838,6 +2844,7 @@ int drmMMUnlock(int fd, unsigned memType)
memset(&arg, 0, sizeof(arg));
arg.mem_type = memType;
+ arg.lock_unlock_bm = unlockBM;
do{
ret = ioctl(fd, DRM_IOCTL_MM_UNLOCK, &arg);