summaryrefslogtreecommitdiffstats
path: root/include/drm/ttm
diff options
context:
space:
mode:
authorChristian König2019-06-04 17:07:10 +0200
committerAlex Deucher2019-06-06 05:18:09 +0200
commitae96e8d7b6f437a0cece42c2e834d64c8f22234c (patch)
tree212462ca81fdcf20c3e6210687851c0eb5024f07 /include/drm/ttm
parentdrm/amdgpu/display: Drop some new CONFIG_DRM_AMD_DC_DCN1_01 guards (diff)
downloadkernel-qcow2-linux-ae96e8d7b6f437a0cece42c2e834d64c8f22234c.tar.gz
kernel-qcow2-linux-ae96e8d7b6f437a0cece42c2e834d64c8f22234c.tar.xz
kernel-qcow2-linux-ae96e8d7b6f437a0cece42c2e834d64c8f22234c.zip
drm/ttm: fix ttm_bo_unreserve
Since we now keep BOs on the LRU we need to explicitely remove them from the LRU now after they are pinned. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/drm/ttm')
-rw-r--r--include/drm/ttm/ttm_bo_driver.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 9f54cf9c60df..c9b8ba492f24 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -767,14 +767,12 @@ static inline int ttm_bo_reserve_slowpath(struct ttm_buffer_object *bo,
*/
static inline void ttm_bo_unreserve(struct ttm_buffer_object *bo)
{
- if (!(bo->mem.placement & TTM_PL_FLAG_NO_EVICT)) {
- spin_lock(&bo->bdev->glob->lru_lock);
- if (list_empty(&bo->lru))
- ttm_bo_add_to_lru(bo);
- else
- ttm_bo_move_to_lru_tail(bo, NULL);
- spin_unlock(&bo->bdev->glob->lru_lock);
- }
+ spin_lock(&bo->bdev->glob->lru_lock);
+ if (list_empty(&bo->lru))
+ ttm_bo_add_to_lru(bo);
+ else
+ ttm_bo_move_to_lru_tail(bo, NULL);
+ spin_unlock(&bo->bdev->glob->lru_lock);
reservation_object_unlock(bo->resv);
}