aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd
diff options
context:
space:
mode:
authorOak Zeng <Oak.Zeng@amd.com>2018-08-27 15:18:36 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-08-29 12:35:00 -0500
commitbf47afbabf1cf149f9ebc8e1f7dab6913e360dc4 (patch)
treec199e1bcd080fa3878d025b5c419b8ecb172dd05 /drivers/gpu/drm/amd/amdkfd
parentdrm/amdgpu: Set pasid for compute vm (v2) (diff)
downloadlinux-dev-bf47afbabf1cf149f9ebc8e1f7dab6913e360dc4.tar.xz
linux-dev-bf47afbabf1cf149f9ebc8e1f7dab6913e360dc4.zip
drm/amdkfd: Release an acquired process vm
For compute vm acquired from amdgpu, vm.pasid is managed by kfd. Decouple pasid from such vm on process destroy to avoid duplicate pasid release. Signed-off-by: Oak Zeng <Oak.Zeng@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_process.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index a246b8d76c86..0039e451d9af 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -322,8 +322,10 @@ static void kfd_process_destroy_pdds(struct kfd_process *p)
pr_debug("Releasing pdd (topology id %d) for process (pasid %d)\n",
pdd->dev->id, p->pasid);
- if (pdd->drm_file)
+ if (pdd->drm_file) {
+ pdd->dev->kfd2kgd->release_process_vm(pdd->dev->kgd, pdd->vm);
fput(pdd->drm_file);
+ }
else if (pdd->vm)
pdd->dev->kfd2kgd->destroy_process_vm(
pdd->dev->kgd, pdd->vm);