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

Monk Liu Monk.Liu at amd.com
Tue Jan 10 10:57:02 UTC 2017


free bo_va and put fence right before VM finish

Change-Id: I56967e424c888c0df0b12c522e6720a1d11ab790
Signed-off-by: Monk Liu <Monk.Liu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 9b37317..51f15c4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -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)
-- 
2.7.4



More information about the amd-gfx mailing list