Commit 8c7655a0 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/ttm: add helper structures for bulk moves on lru list

Add bulk move pos to store the pointer of first and last buffer object.
The list in between will be bulk moved on lru list.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
Tested-by: default avatarMike Lothian <mike@fireburn.co.uk>
Tested-by: default avatarDieter Nützel <Dieter@nuetzel-hh.de>
Acked-by: default avatarChunming Zhou <david1.zhou@amd.com>
Reviewed-by: default avatarJunwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 11c3a249
...@@ -490,6 +490,34 @@ struct ttm_bo_device { ...@@ -490,6 +490,34 @@ struct ttm_bo_device {
bool no_retry; bool no_retry;
}; };
/**
* struct ttm_lru_bulk_move_pos
*
* @first: first BO in the bulk move range
* @last: last BO in the bulk move range
*
* Positions for a lru bulk move.
*/
struct ttm_lru_bulk_move_pos {
struct ttm_buffer_object *first;
struct ttm_buffer_object *last;
};
/**
* struct ttm_lru_bulk_move
*
* @tt: first/last lru entry for BOs in the TT domain
* @vram: first/last lru entry for BOs in the VRAM domain
* @swap: first/last lru entry for BOs on the swap list
*
* Helper structure for bulk moves on the LRU list.
*/
struct ttm_lru_bulk_move {
struct ttm_lru_bulk_move_pos tt[TTM_MAX_BO_PRIORITY];
struct ttm_lru_bulk_move_pos vram[TTM_MAX_BO_PRIORITY];
struct ttm_lru_bulk_move_pos swap[TTM_MAX_BO_PRIORITY];
};
/** /**
* ttm_flag_masked * ttm_flag_masked
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment