aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_bo.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-10-04 09:51:01 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-10-17 10:59:48 +0200
commit12b989a7108a52f16b1b1bb6dd2ea818c235b52c (patch)
treedea8404dd6ff5b002d1c1a413b62208eb101efd5 /linux-core/drm_bo.c
parent646560d1d112b58899f9e4cab0c966cec7e0b8c3 (diff)
Revert "Remove the pinned buffer from the LRU when pinning."
This reverts 3a0bc518e35c62bb9c64c9105f836584d949653f commit.
Diffstat (limited to 'linux-core/drm_bo.c')
-rw-r--r--linux-core/drm_bo.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c
index fb360e7f..099ebe07 100644
--- a/linux-core/drm_bo.c
+++ b/linux-core/drm_bo.c
@@ -1965,8 +1965,8 @@ drm_bo_set_pin(struct drm_device *dev, struct drm_buffer_object *bo,
return ret;
}
- /* Validate the buffer into its pinned location, with no
- * pending fence.
+ /* Validate the buffer into its pinned location, with no pending
+ * fence.
*/
ret = drm_buffer_object_validate(bo, bo->fence_class, 0, 0);
if (ret) {
@@ -1974,12 +1974,9 @@ drm_bo_set_pin(struct drm_device *dev, struct drm_buffer_object *bo,
return ret;
}
- /* Pull the buffer off of the LRU and add it to the pinned
- * list
- */
+ /* Add our buffer to the pinned list */
bo->pinned_mem_type = bo->mem.mem_type;
mutex_lock(&dev->struct_mutex);
- list_del_init(&bo->lru);
list_del_init(&bo->pinned_lru);
drm_bo_add_to_pinned_lru(bo);
@@ -1989,7 +1986,6 @@ drm_bo_set_pin(struct drm_device *dev, struct drm_buffer_object *bo,
bo->pinned_node = bo->mem.mm_node;
}
- bo->pinned = pin;
mutex_unlock(&dev->struct_mutex);
} else {
@@ -2001,9 +1997,9 @@ drm_bo_set_pin(struct drm_device *dev, struct drm_buffer_object *bo,
list_del_init(&bo->pinned_lru);
bo->pinned_node = NULL;
- bo->pinned = pin;
mutex_unlock(&dev->struct_mutex);
}
+ bo->pinned = pin;
mutex_unlock(&bo->mutex);
return 0;
}