drm/amdkfd: Use drm_priv to pass VM from KFD to amdgpu
authorFelix Kuehling <Felix.Kuehling@amd.com>
Wed, 7 Apr 2021 22:19:58 +0000 (18:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:23:47 +0000 (12:23 +0200)
commit89e7a625ec5c71a06214b6cc4fbc9fbc6115fa6a
treead3e7f3816535b2335fc942215162b09303c1435
parent1d14c1c7a3bd9a4d8ddcd843392ccb12d98763b6
drm/amdkfd: Use drm_priv to pass VM from KFD to amdgpu

commit b40a6ab2cf9213923bf8e821ce7fa7f6a0a26990 upstream.

amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu needs the drm_priv to allow mmap
to access the BO through the corresponding file descriptor. The VM can
also be extracted from drm_priv, so drm_priv can replace the vm parameter
in the kfd2kgd interface.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Philip Yang <philip.yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
[This is a partial cherry-pick of the upstream commit.]
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c