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

drm/ttm: use pin_count more extensively

Check the pin_count instead of the lru list is empty here.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Link: https://patchwork.freedesktop.org/patch/404617/
parent 2200736a
......@@ -938,9 +938,8 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
}
error:
if (bo->mem.mem_type == TTM_PL_SYSTEM && !list_empty(&bo->lru)) {
if (bo->mem.mem_type == TTM_PL_SYSTEM && !bo->pin_count)
ttm_bo_move_to_lru_tail_unlocked(bo);
}
return ret;
}
......
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