aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/ttm/ttm_bo_api.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/ttm/ttm_bo_api.h')
-rw-r--r--include/drm/ttm/ttm_bo_api.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
index beafc156a535..b0fc9c12554b 100644
--- a/include/drm/ttm/ttm_bo_api.h
+++ b/include/drm/ttm/ttm_bo_api.h
@@ -364,6 +364,44 @@ extern int ttm_bo_validate(struct ttm_buffer_object *bo,
364 */ 364 */
365extern void ttm_bo_unref(struct ttm_buffer_object **bo); 365extern void ttm_bo_unref(struct ttm_buffer_object **bo);
366 366
367
368/**
369 * ttm_bo_list_ref_sub
370 *
371 * @bo: The buffer object.
372 * @count: The number of references with which to decrease @bo::list_kref;
373 * @never_free: The refcount should not reach zero with this operation.
374 *
375 * Release @count lru list references to this buffer object.
376 */
377extern void ttm_bo_list_ref_sub(struct ttm_buffer_object *bo, int count,
378 bool never_free);
379
380/**
381 * ttm_bo_add_to_lru
382 *
383 * @bo: The buffer object.
384 *
385 * Add this bo to the relevant mem type lru and, if it's backed by
386 * system pages (ttms) to the swap list.
387 * This function must be called with struct ttm_bo_global::lru_lock held, and
388 * is typically called immediately prior to unreserving a bo.
389 */
390extern void ttm_bo_add_to_lru(struct ttm_buffer_object *bo);
391
392/**
393 * ttm_bo_del_from_lru
394 *
395 * @bo: The buffer object.
396 *
397 * Remove this bo from all lru lists used to lookup and reserve an object.
398 * This function must be called with struct ttm_bo_global::lru_lock held,
399 * and is usually called just immediately after the bo has been reserved to
400 * avoid recursive reservation from lru lists.
401 */
402extern int ttm_bo_del_from_lru(struct ttm_buffer_object *bo);
403
404
367/** 405/**
368 * ttm_bo_lock_delayed_workqueue 406 * ttm_bo_lock_delayed_workqueue
369 * 407 *