Patch "drm/ttm: Do not add non-system domain BO into swap list" has been added to the 5.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/ttm: Do not add non-system domain BO into swap list

to the 5.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-ttm-do-not-add-non-system-domain-bo-into-swap-li.patch
and it can be found in the queue-5.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit dff1c397d42afe14c71a841b0525d2dc2a06bdd9
Author: xinhui pan <xinhui.pan@xxxxxxx>
Date:   Wed Feb 24 11:28:08 2021 +0800

    drm/ttm: Do not add non-system domain BO into swap list
    
    [ Upstream commit ad2c28bd9a4083816fa45a7e90c2486cde8a9873 ]
    
    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@xxxxxxx>
    Acked-by: Guchun Chen <guchun.chen@xxxxxxx>
    Acked-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Reviewed-by: Christian König <christian.koenig@xxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210224032808.150465-1-xinhui.pan@xxxxxxx
    Signed-off-by: Christian König <christian.koenig@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux