Commit 6bfad4ab authored by Christian König's avatar Christian König Committed by Christian König

drm/ttm: fix false positive assert

The assert sometimes incorrectly triggers when pinned BOs are destroyed.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Tested-by: default avatarPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Link: https://patchwork.freedesktop.org/patch/356737/
parent 7cd7943d
...@@ -151,8 +151,6 @@ static void ttm_bo_add_mem_to_lru(struct ttm_buffer_object *bo, ...@@ -151,8 +151,6 @@ static void ttm_bo_add_mem_to_lru(struct ttm_buffer_object *bo,
struct ttm_bo_device *bdev = bo->bdev; struct ttm_bo_device *bdev = bo->bdev;
struct ttm_mem_type_manager *man; struct ttm_mem_type_manager *man;
dma_resv_assert_held(bo->base.resv);
if (!list_empty(&bo->lru)) if (!list_empty(&bo->lru))
return; return;
...@@ -604,7 +602,8 @@ static void ttm_bo_release(struct kref *kref) ...@@ -604,7 +602,8 @@ static void ttm_bo_release(struct kref *kref)
*/ */
if (bo->mem.placement & TTM_PL_FLAG_NO_EVICT) { if (bo->mem.placement & TTM_PL_FLAG_NO_EVICT) {
bo->mem.placement &= ~TTM_PL_FLAG_NO_EVICT; bo->mem.placement &= ~TTM_PL_FLAG_NO_EVICT;
ttm_bo_move_to_lru_tail(bo, NULL); ttm_bo_del_from_lru(bo);
ttm_bo_add_mem_to_lru(bo, &bo->mem);
} }
kref_init(&bo->kref); kref_init(&bo->kref);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment