drm/amdkfd: use hmm range fault to get both domain pfns
authorAlex Sierra <alex.sierra@amd.com>
Wed, 23 Jun 2021 22:06:22 +0000 (17:06 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 1 Jul 2021 04:05:41 +0000 (00:05 -0400)
commit278a708758b5fc6d3101776b0e3846a8cd37e188
treef4c4465b5d818b136c770fc9cd9c242f03e2a825
parent1fc160cfe17ad741157ba8bf38ea5867f4d9fe53
drm/amdkfd: use hmm range fault to get both domain pfns

Now that prange could have mixed domains (VRAM or SYSRAM),
actual_loc nor svm_bo can not be used to check its current
domain and eventually get its pfns to map them in GPU.
Instead, pfns from both domains, are now obtained from
hmm_range_fault through amdgpu_hmm_range_get_pages
call. This is done everytime a GPU map occur.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_svm.c