drm/amdkfd: add pinned BOs to kfd_bo_list
authorLang Yu <Lang.Yu@amd.com>
Tue, 31 May 2022 01:19:43 +0000 (09:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jun 2022 12:21:56 +0000 (14:21 +0200)
commit4a0d2797918c87e30193167a2da6a743aa2cddc1
tree2ebd6c6ab91d5ce81ec6798baa8de58a6f08712c
parent6d235ef00d8231dc72ef987c39f8683bb9a017ee
drm/amdkfd: add pinned BOs to kfd_bo_list

[ Upstream commit 4fac4fcf4500bce515b0f32195e7bb86aa0246c6 ]

The kfd_bo_list is used to restore process BOs after
evictions. As page tables could be destroyed during
evictions, we should also update pinned BOs' page tables
during restoring to make sure they are valid.

So for pinned BOs,
1, Validate them and update their page tables.
2, Don't add eviction fence for them.

v2:
 - Don't handle pinned ones specially in BO validation.(Felix)

Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c