diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-10-21 12:20:56 +0200 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-10-21 12:20:56 +0200 |
commit | 3b19b50cb5cd31e60eb03e99dd1109b6d0f5b8a3 (patch) | |
tree | d117764ba0985fccb1398beb9613ba5d6d066467 /libdrm/xf86drm.c | |
parent | 48b5eaf303b60077faed09db77785d7a544ac335 (diff) |
Remove the need for the hardware lock in the buffer manager.
Add interface entry cleaning a memory type without touching NO_EVICT buffers.
Diffstat (limited to 'libdrm/xf86drm.c')
-rw-r--r-- | libdrm/xf86drm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index b61c2250..ee0043cb 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -2820,14 +2820,15 @@ int drmMMTakedown(int fd, unsigned memType) * the buffer manager is NOT locked. */ -int drmMMLock(int fd, unsigned memType, int lockBM) +int drmMMLock(int fd, unsigned memType, int lockBM, int ignoreNoEvict) { struct drm_mm_type_arg arg; int ret; memset(&arg, 0, sizeof(arg)); arg.mem_type = memType; - arg.lock_unlock_bm = lock_bm; + arg.lock_flags |= (lockBM) ? DRM_BO_LOCK_UNLOCK_BM : 0; + arg.lock_flags |= (ignoreNoEvict) = DRM_BO_LOCK_IGNORE_NO_EVICT; do{ ret = ioctl(fd, DRM_IOCTL_MM_LOCK, &arg); @@ -2844,7 +2845,7 @@ int drmMMUnlock(int fd, unsigned memType, int unlockBM) memset(&arg, 0, sizeof(arg)); arg.mem_type = memType; - arg.lock_unlock_bm = unlockBM; + arg.lock_flags |= (unlockBM) ? DRM_BO_LOCK_UNLOCK_BM : 0; do{ ret = ioctl(fd, DRM_IOCTL_MM_UNLOCK, &arg); |