diff options
author | Christian König <ckoenig.leichtzumerken@gmail.com> | 2020-03-06 13:41:55 +0100 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2020-03-11 10:52:16 +0100 |
commit | 6bfad4abac2a02a8f74ac630b7cdf5fb401fce05 (patch) | |
tree | 1c5b6b6fcc77125dcb6d64f7c3f4d0d25b79cd46 /drivers/gpu/drm/ttm | |
parent | 7cd7943dc55e0f75a8e51af2bbdb2b0415cc3eb7 (diff) | |
download | lwn-6bfad4abac2a02a8f74ac630b7cdf5fb401fce05.tar.gz lwn-6bfad4abac2a02a8f74ac630b7cdf5fb401fce05.zip |
drm/ttm: fix false positive assert
The assert sometimes incorrectly triggers when pinned BOs are destroyed.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Tested-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Link: https://patchwork.freedesktop.org/patch/356737/
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 6d1e91be9c78..9e07c3f75156 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -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_mem_type_manager *man; - dma_resv_assert_held(bo->base.resv); - if (!list_empty(&bo->lru)) return; @@ -604,7 +602,8 @@ static void ttm_bo_release(struct kref *kref) */ if (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); |