Skip to content

Commit

Permalink
drm/ttm: Do not add non-system domain BO into swap list
Browse files Browse the repository at this point in the history
[ Upstream commit ad2c28b ]

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 <xinhui.pan@amd.com>
Acked-by: Guchun Chen <guchun.chen@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210224032808.150465-1-xinhui.pan@amd.com
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
xinhui pan authored and gregkh committed May 26, 2021
1 parent 928ffb1 commit f4550f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/ttm/ttm_bo.c
Expand Up @@ -153,6 +153,8 @@ void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo,

swap = &ttm_bo_glob.swap_lru[bo->priority];
list_move_tail(&bo->swap, swap);
} else {
list_del_init(&bo->swap);
}

if (bdev->driver->del_from_lru_notify)
Expand Down

0 comments on commit f4550f0

Please sign in to comment.