Commit e8c93e0c authored by Christian König's avatar Christian König

drm/ttm: remove TTM_PL_FLAG_NO_EVICT

Not used any more.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Link: https://patchwork.freedesktop.org/patch/391604/?series=81973&rev=1
parent 28578f35
...@@ -118,9 +118,6 @@ static void ttm_bo_add_mem_to_lru(struct ttm_buffer_object *bo, ...@@ -118,9 +118,6 @@ static void ttm_bo_add_mem_to_lru(struct ttm_buffer_object *bo,
if (!list_empty(&bo->lru) || bo->pin_count) if (!list_empty(&bo->lru) || bo->pin_count)
return; return;
if (mem->placement & TTM_PL_FLAG_NO_EVICT)
return;
man = ttm_manager_type(bdev, mem->mem_type); man = ttm_manager_type(bdev, mem->mem_type);
list_add_tail(&bo->lru, &man->lru[bo->priority]); list_add_tail(&bo->lru, &man->lru[bo->priority]);
...@@ -165,8 +162,7 @@ void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo, ...@@ -165,8 +162,7 @@ void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo,
ttm_bo_del_from_lru(bo); ttm_bo_del_from_lru(bo);
ttm_bo_add_mem_to_lru(bo, &bo->mem); ttm_bo_add_mem_to_lru(bo, &bo->mem);
if (bulk && !(bo->mem.placement & TTM_PL_FLAG_NO_EVICT) && if (bulk && !bo->pin_count) {
!bo->pin_count) {
switch (bo->mem.mem_type) { switch (bo->mem.mem_type) {
case TTM_PL_TT: case TTM_PL_TT:
ttm_bo_bulk_move_set_pos(&bulk->tt[bo->priority], bo); ttm_bo_bulk_move_set_pos(&bulk->tt[bo->priority], bo);
...@@ -541,12 +537,11 @@ static void ttm_bo_release(struct kref *kref) ...@@ -541,12 +537,11 @@ static void ttm_bo_release(struct kref *kref)
spin_lock(&ttm_bo_glob.lru_lock); spin_lock(&ttm_bo_glob.lru_lock);
/* /*
* Make NO_EVICT bos immediately available to * Make pinned bos immediately available to
* shrinkers, now that they are queued for * shrinkers, now that they are queued for
* destruction. * destruction.
*/ */
if (bo->mem.placement & TTM_PL_FLAG_NO_EVICT || bo->pin_count) { if (bo->pin_count) {
bo->mem.placement &= ~TTM_PL_FLAG_NO_EVICT;
bo->pin_count = 0; bo->pin_count = 0;
ttm_bo_del_from_lru(bo); ttm_bo_del_from_lru(bo);
ttm_bo_add_mem_to_lru(bo, &bo->mem); ttm_bo_add_mem_to_lru(bo, &bo->mem);
......
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
#define TTM_PL_FLAG_UNCACHED (1 << 17) #define TTM_PL_FLAG_UNCACHED (1 << 17)
#define TTM_PL_FLAG_WC (1 << 18) #define TTM_PL_FLAG_WC (1 << 18)
#define TTM_PL_FLAG_CONTIGUOUS (1 << 19) #define TTM_PL_FLAG_CONTIGUOUS (1 << 19)
#define TTM_PL_FLAG_NO_EVICT (1 << 21)
#define TTM_PL_FLAG_TOPDOWN (1 << 22) #define TTM_PL_FLAG_TOPDOWN (1 << 22)
#define TTM_PL_MASK_CACHING (TTM_PL_FLAG_CACHED | \ #define TTM_PL_MASK_CACHING (TTM_PL_FLAG_CACHED | \
......
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