mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-16 01:24:08 +08:00
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>
This commit is contained in:
parent
621b325aa8
commit
ae96e8d7b6
@ -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)
|
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);
|
||||||
spin_lock(&bo->bdev->glob->lru_lock);
|
if (list_empty(&bo->lru))
|
||||||
if (list_empty(&bo->lru))
|
ttm_bo_add_to_lru(bo);
|
||||||
ttm_bo_add_to_lru(bo);
|
else
|
||||||
else
|
ttm_bo_move_to_lru_tail(bo, NULL);
|
||||||
ttm_bo_move_to_lru_tail(bo, NULL);
|
spin_unlock(&bo->bdev->glob->lru_lock);
|
||||||
spin_unlock(&bo->bdev->glob->lru_lock);
|
|
||||||
}
|
|
||||||
reservation_object_unlock(bo->resv);
|
reservation_object_unlock(bo->resv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user