Skip to contentSkip to conversation

drm/amdgpu:without unmap_csa, we need manually do cleanup

PATCH New Monk Liu 1 participant 1 message Jan 10, 2017

Subsystems (2)
lore
Share & tools
lore

Monk Liu

author
#0 lore raw

PATCH 4/4 drm/amdgpu:without unmap_csa, we need manually do cleanup

free bo_va and put fence right before VM finish

Change-Id I56967e424c888c0df0b12c522e6720a1d11ab790
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +5 -0
index 9b37317..51f15c4 100644
@@ -694,6 +694,11 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
 	amdgpu_uvd_free_handles(adev, file_priv);
 	amdgpu_vce_free_handles(adev, file_priv);
 
+	if (amdgpu_sriov_vf(adev)) {
+		fence_put(fpriv->vm.vm_virt.csa_bo_va->last_pt_update);
+		kfree(fpriv->vm.vm_virt.csa_bo_va);
+	}
+
 	amdgpu_vm_fini(adev, &fpriv->vm);
 
 	idr_for_each_entry(&fpriv->bo_list_handles, list, handle)
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx