aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_bo.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-10-21 12:20:56 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-10-21 12:20:56 +0200
commit3b19b50cb5cd31e60eb03e99dd1109b6d0f5b8a3 (patch)
treed117764ba0985fccb1398beb9613ba5d6d066467 /linux-core/drm_bo.c
parent48b5eaf303b60077faed09db77785d7a544ac335 (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 'linux-core/drm_bo.c')
-rw-r--r--linux-core/drm_bo.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c
index a2a0291d..e6eb6320 100644
--- a/linux-core/drm_bo.c
+++ b/linux-core/drm_bo.c
@@ -2255,11 +2255,11 @@ int drm_mm_init_ioctl(struct drm_device *dev, void *data, struct drm_file *file_
return -EINVAL;
}
- ret = -EINVAL;
ret = drm_bo_write_lock(&bm->bm_lock, file_priv);
if (ret)
return ret;
+ ret = -EINVAL;
if (arg->magic != DRM_BO_INIT_MAGIC) {
DRM_ERROR("You are using an old libdrm that is not compatible with\n"
"\tthe kernel DRM module. Please upgrade your libdrm.\n");
@@ -2353,7 +2353,12 @@ int drm_mm_lock_ioctl(struct drm_device *dev, void *data, struct drm_file *file_
return -EINVAL;
}
- if (arg->lock_unlock_bm) {
+ if (arg->lock_flags & DRM_BO_LOCK_IGNORE_NO_EVICT) {
+ DRM_ERROR("Lock flag DRM_BO_LOCK_IGNORE_NO_EVICT not supported yet.\n");
+ return -EINVAL;
+ }
+
+ if (arg->lock_flags & DRM_BO_LOCK_UNLOCK_BM) {
ret = drm_bo_write_lock(&dev->bm.bm_lock, file_priv);
if (ret)
return ret;
@@ -2383,7 +2388,7 @@ int drm_mm_unlock_ioctl(struct drm_device *dev,
return -EINVAL;
}
- if (arg->lock_unlock_bm) {
+ if (arg->lock_flags & DRM_BO_LOCK_UNLOCK_BM) {
ret = drm_bo_write_unlock(&dev->bm.bm_lock, file_priv);
if (ret)
return ret;