summaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-01-11 15:35:20 +0100
committerAlex Deucher <alexander.deucher@amd.com>2016-01-13 12:21:21 -0500
commitab74961810ba7935b5f9643da10daaa36690f48e (patch)
treee821b843633d9869e7a74c56c1ced05170d01acf /include/drm
parented704a43e84cc536081423dcd3491acf2791aaeb (diff)
downloadlinux-stable-ab74961810ba7935b5f9643da10daaa36690f48e.tar.gz
linux-stable-ab74961810ba7935b5f9643da10daaa36690f48e.tar.bz2
linux-stable-ab74961810ba7935b5f9643da10daaa36690f48e.zip
drm/ttm: add ttm_bo_move_to_lru_tail function v2
This allows the drivers to move a BO to the end of the LRU without removing and adding it again. v2: Make it more robust, handle pinned and swapable BOs as well. Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/ttm/ttm_bo_api.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
index c768ddfbe53c..afae2316bd43 100644
--- a/include/drm/ttm/ttm_bo_api.h
+++ b/include/drm/ttm/ttm_bo_api.h
@@ -383,6 +383,16 @@ extern void ttm_bo_add_to_lru(struct ttm_buffer_object *bo);
*/
extern int ttm_bo_del_from_lru(struct ttm_buffer_object *bo);
+/**
+ * ttm_bo_move_to_lru_tail
+ *
+ * @bo: The buffer object.
+ *
+ * Move this BO to the tail of all lru lists used to lookup and reserve an
+ * object. This function must be called with struct ttm_bo_global::lru_lock
+ * held, and is used to make a BO less likely to be considered for eviction.
+ */
+extern void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo);
/**
* ttm_bo_lock_delayed_workqueue