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>
This commit is contained in:
@@ -416,6 +416,16 @@ void ttm_bo_del_from_lru(struct ttm_buffer_object *bo);
|
||||
void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo,
|
||||
struct ttm_lru_bulk_move *bulk);
|
||||
|
||||
/**
|
||||
* ttm_bo_bulk_move_lru_tail
|
||||
*
|
||||
* @bulk: bulk move structure
|
||||
*
|
||||
* Bulk move BOs to the LRU tail, only valid to use when driver makes sure that
|
||||
* BO order never changes. Should be called with ttm_bo_global::lru_lock held.
|
||||
*/
|
||||
void ttm_bo_bulk_move_lru_tail(struct ttm_lru_bulk_move *bulk);
|
||||
|
||||
/**
|
||||
* ttm_bo_lock_delayed_workqueue
|
||||
*
|
||||
|
Reference in New Issue
Block a user