summaryrefslogtreecommitdiffstats
path: root/include/drm/ttm
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2018-08-06 05:28:35 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-08-27 12:11:21 -0400
commit7748e2dcdaad901776c0d78e76e066403e95513c (patch)
treee8a8ee0313a5c957f2c5a5bf772b171d882f1d7f /include/drm/ttm
parent9a2779528eddacf0123bfd7308b71141b54cc619 (diff)
drm/ttm: add bulk move function on LRU
This function allow us to bulk move a group of BOs to the tail of their LRU. The positions of group of BOs are stored on the (first, last) bulk_move_pos structure. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Huang Rui <ray.huang@amd.com> Tested-by: Mike Lothian <mike@fireburn.co.uk> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Acked-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/drm/ttm')
-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 0d4eb81423ee..8c19470785e2 100644
--- a/include/drm/ttm/ttm_bo_api.h
+++ b/include/drm/ttm/ttm_bo_api.h
@@ -417,6 +417,16 @@ void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo,
417 struct ttm_lru_bulk_move *bulk); 417 struct ttm_lru_bulk_move *bulk);
418 418
419/** 419/**
420 * ttm_bo_bulk_move_lru_tail
421 *
422 * @bulk: bulk move structure
423 *
424 * Bulk move BOs to the LRU tail, only valid to use when driver makes sure that
425 * BO order never changes. Should be called with ttm_bo_global::lru_lock held.
426 */
427void ttm_bo_bulk_move_lru_tail(struct ttm_lru_bulk_move *bulk);
428
429/**
420 * ttm_bo_lock_delayed_workqueue 430 * ttm_bo_lock_delayed_workqueue
421 * 431 *
422 * Prevent the delayed workqueue from running. 432 * Prevent the delayed workqueue from running.