提交 ed704a43 编写于 作者: C Christian König 提交者: Alex Deucher

drm/ttm: fix adding foreign BOs to the swap LRU

It doesn't make any sense to try to swap out imported BOs.
Reviewed-by: NThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: NChristian König <christian.koenig@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 33d48cf8
...@@ -176,7 +176,7 @@ void ttm_bo_add_to_lru(struct ttm_buffer_object *bo) ...@@ -176,7 +176,7 @@ void ttm_bo_add_to_lru(struct ttm_buffer_object *bo)
list_add_tail(&bo->lru, &man->lru); list_add_tail(&bo->lru, &man->lru);
kref_get(&bo->list_kref); kref_get(&bo->list_kref);
if (bo->ttm != NULL) { if (bo->ttm && !(bo->ttm->page_flags & TTM_PAGE_FLAG_SG)) {
list_add_tail(&bo->swap, &bo->glob->swap_lru); list_add_tail(&bo->swap, &bo->glob->swap_lru);
kref_get(&bo->list_kref); kref_get(&bo->list_kref);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部