From 1c80a01fc2937267c36ee10c9932dad197abaa21 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 28 Aug 2023 16:20:21 +0000 Subject: [PATCH] Revert "drm/ttm: never consider pinned BOs for eviction&swap" This reverts commit 8996b13051f0c211aaaf243dfd270003f1b67431 which is commit a2848d08742c8e8494675892c02c0d22acbe3cf8 upstream. It breaks the Android kernel abi, and is not needed for any Android devices at this time. If it is needed in the future, it can be brought back in an abi-safe way. Bug: 161946584 Change-Id: I9d6e3021fdefbab998d058e1b4ab8d559f26aec3 Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/ttm/ttm_bo.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index dca4dfdd332d..9a05caec3c99 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -672,12 +672,6 @@ static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo, { bool ret = false; - if (bo->pin_count) { - *locked = false; - *busy = false; - return false; - } - if (bo->base.resv == ctx->resv) { dma_resv_assert_held(bo->base.resv); if (ctx->flags & TTM_OPT_FLAG_ALLOW_RES_EVICT)