aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxinhui pan <[email protected]>2021-02-24 11:28:08 +0800
committerChristian König <[email protected]>2021-02-25 13:26:07 +0100
commitad2c28bd9a4083816fa45a7e90c2486cde8a9873 (patch)
tree5af43bc87900198a499a67f0bf914e7d514e531f
parent3ade7a69e82c4405e2b1f4a87b32029532207ae2 (diff)
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 <[email protected]> Acked-by: Guchun Chen <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Christian König <[email protected]>
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index e38102282fd5..a08dec7281fc 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)