Skip to content

Commit 65ca256

Browse files
committed
Revert "drm/ttm: make ttm_bo_unpin more defensive"
This reverts commit 0492006 which is commit 6c54031 upstream. It, and the following revert, are causing unneeded warnings to be sent to the kernel log. For 5.11 these are not needed at this point in time. Cc: Christian König <christian.koenig@amd.com> Cc: Matthew Auld <matthew.auld@intel.com> Cc: Sasha Levin <sashal@kernel.org> Link: https://lore.kernel.org/r/8c3da8bc-0bf3-496f-1fd6-4f65a07b2d13@amd.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent bf76829 commit 65ca256

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎include/drm/ttm/ttm_bo_api.h‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,11 +613,9 @@ static inline void ttm_bo_pin(struct ttm_buffer_object *bo)
613613
static inline void ttm_bo_unpin(struct ttm_buffer_object *bo)
614614
{
615615
dma_resv_assert_held(bo->base.resv);
616+
WARN_ON_ONCE(!bo->pin_count);
616617
WARN_ON_ONCE(!kref_read(&bo->kref));
617-
if (bo->pin_count)
618-
--bo->pin_count;
619-
else
620-
WARN_ON_ONCE(true);
618+
--bo->pin_count;
621619
}
622620

623621
int ttm_mem_evict_first(struct ttm_bo_device *bdev,

0 commit comments

Comments
 (0)