mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-24 17:10:13 +01:00
Revert "Remove the pinned buffer from the LRU when pinning."
This reverts 3a0bc518e3 commit.
This commit is contained in:
parent
cfe20cbf2e
commit
40b411d2e2
2 changed files with 4 additions and 9 deletions
|
|
@ -269,7 +269,6 @@ PAGE_AGP := $(shell cat $(LINUXDIR)/include/asm/agp.h 2>/dev/null | \
|
|||
ifneq ($(PAGE_AGP),0)
|
||||
EXTRA_CFLAGS += -DHAVE_PAGE_AGP
|
||||
endif
|
||||
EXTRA_CFLAGS += -g -O0
|
||||
|
||||
# Start with all modules turned off.
|
||||
CONFIG_DRM_GAMMA := n
|
||||
|
|
|
|||
|
|
@ -2053,8 +2053,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) {
|
||||
|
|
@ -2062,12 +2062,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);
|
||||
|
||||
|
|
@ -2077,7 +2074,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 {
|
||||
|
|
@ -2089,9 +2085,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue