]> 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)
commit5807316b069572914033ae207071b2fc83cc7d32
tree8ee0f06a134fbbec7549c8b4d6551949b4014194
parent11e3a2889c5582752aee4d93aca88e5372c90b6d
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: 60c16f94c2ad ("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