]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/ttm: fix bulk move handling v2
authorChristian König <christian.koenig@amd.com>
Mon, 13 Jun 2022 07:37:03 +0000 (09:37 +0200)
committerChristian König <christian.koenig@amd.com>
Tue, 14 Jun 2022 09:15:19 +0000 (11:15 +0200)
commit0f9cd1ea10d307cad221d6693b648a8956e812b0
tree8ee0f06a134fbbec7549c8b4d6551949b4014194
parent81b0d0e4f811553cbe2d58c8a495c124fb626432
drm/ttm: fix bulk move handling v2

The resource must be on the LRU before ttm_lru_bulk_move_add() is called
and we need to check if the BO is pinned or not before adding it.

Additional to that we missed taking the LRU spinlock in ttm_bo_unpin().

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Acked-by: Luben Tuikov <luben.tuikov@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220613080816.4965-1-christian.koenig@amd.com
Fixes: fee2ede15542 ("drm/ttm: rework bulk move handling v5")
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_resource.c
include/drm/ttm/ttm_resource.h