From: xinhui pan Date: Wed, 24 Feb 2021 03:28:08 +0000 (+0800) Subject: drm/ttm: Do not add non-system domain BO into swap list X-Git-Tag: v5.13-rc1~123^2~14^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad2c28bd9a4083816fa45a7e90c2486cde8a9873;p=thirdparty%2Fkernel%2Flinux.git drm/ttm: Do not add non-system domain BO into swap list BO would be added into swap list if it is validated into system domain. If BO is validated again into non-system domain, say, VRAM domain. It actually should not be in the swap list. Signed-off-by: xinhui pan Acked-by: Guchun Chen Acked-by: Alex Deucher Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210224032808.150465-1-xinhui.pan@amd.com Signed-off-by: Christian König --- diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index e38102282fd58..a08dec7281fcb 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -111,6 +111,8 @@ void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo, swap = &ttm_glob.swap_lru[bo->priority]; list_move_tail(&bo->swap, swap); + } else { + list_del_init(&bo->swap); } if (bdev->funcs->del_from_lru_notify)