mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 21:54:06 +08:00
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: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
33d48cf825
commit
ed704a43e8
@ -176,7 +176,7 @@ void ttm_bo_add_to_lru(struct ttm_buffer_object *bo)
|
||||
list_add_tail(&bo->lru, &man->lru);
|
||||
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);
|
||||
kref_get(&bo->list_kref);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user