Skip to content

Commit a2848d0

Browse files
drm/ttm: never consider pinned BOs for eviction&swap
There is a small window where we have already incremented the pin count but not yet moved the bo from the lru to the pinned list. Signed-off-by: Christian König <[email protected]> Reported-by: Pelloux-Prayer, Pierre-Eric <[email protected]> Tested-by: Pelloux-Prayer, Pierre-Eric <[email protected]> Acked-by: Alex Deucher <[email protected]> Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 1500805 commit a2848d0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/ttm/ttm_bo.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,12 @@ static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo,
517517
{
518518
bool ret = false;
519519

520+
if (bo->pin_count) {
521+
*locked = false;
522+
*busy = false;
523+
return false;
524+
}
525+
520526
if (bo->base.resv == ctx->resv) {
521527
dma_resv_assert_held(bo->base.resv);
522528
if (ctx->allow_res_evict)

0 commit comments

Comments
 (0)