diff options
author | Christian König <christian.koenig@amd.com> | 2016-01-11 09:35:19 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-01-13 12:19:52 -0500 |
commit | ed704a43e84cc536081423dcd3491acf2791aaeb (patch) | |
tree | 2b9d58d38b88dcfc741bf7d8c99922f22a728ec6 /drivers/gpu/drm | |
parent | 33d48cf8256f2b72e4082a7996c04bf1e78fce81 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index a98a5d5d756d..3ea9a01c960c 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
@@ -176,7 +176,7 @@ void ttm_bo_add_to_lru(struct ttm_buffer_object *bo) | |||
176 | list_add_tail(&bo->lru, &man->lru); | 176 | list_add_tail(&bo->lru, &man->lru); |
177 | kref_get(&bo->list_kref); | 177 | kref_get(&bo->list_kref); |
178 | 178 | ||
179 | if (bo->ttm != NULL) { | 179 | if (bo->ttm && !(bo->ttm->page_flags & TTM_PAGE_FLAG_SG)) { |
180 | list_add_tail(&bo->swap, &bo->glob->swap_lru); | 180 | list_add_tail(&bo->swap, &bo->glob->swap_lru); |
181 | kref_get(&bo->list_kref); | 181 | kref_get(&bo->list_kref); |
182 | } | 182 | } |