]> git.baikalelectronics.ru Git - kernel.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)
commit45a91c026bd8e2e06395bb0c2ae05504510f5540
tree8ee0f06a134fbbec7549c8b4d6551949b4014194
parent1f6da543b0d4df5b11d4071d3d36dbfd7a834581
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: 6961a3fba424 ("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