diff options
author | xinhui pan <xinhui.pan@amd.com> | 2021-02-24 11:28:08 +0800 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2021-04-16 11:01:28 +0200 |
commit | f7c475b8dfc23d461a47dfac5e498f8cc96faea5 (patch) | |
tree | da8d0575c0aacd39383bb6f84299c2ebbe16efd1 | |
parent | d434405aaab7d0ebc516b68a8fc4100922d7f5ef (diff) | |
download | linux-f7c475b8dfc23d461a47dfac5e498f8cc96faea5.tar.bz2 |
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.
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Signed-off-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>
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 2 |
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 101a68dc615b..799ec7a7caa4 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -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) |