drm/msm: Detach the MMU during msm_gpu_cleanup()
Make sure to detach the MMU device before destroying the address space. Change-Id: Ic0dedbadff27fed017840a61ec5e0d55ce0c71e6 Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
This commit is contained in:
parent
ffd2f3eb42
commit
41f5926f41
2 changed files with 9 additions and 3 deletions
|
@ -427,6 +427,8 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
|
|||
|
||||
void adreno_gpu_cleanup(struct adreno_gpu *gpu)
|
||||
{
|
||||
struct msm_gem_address_space *aspace = gpu->base.aspace;
|
||||
|
||||
if (gpu->memptrs_bo) {
|
||||
if (gpu->memptrs_iova)
|
||||
msm_gem_put_iova(gpu->memptrs_bo, gpu->base.id);
|
||||
|
@ -434,5 +436,12 @@ void adreno_gpu_cleanup(struct adreno_gpu *gpu)
|
|||
}
|
||||
release_firmware(gpu->pm4);
|
||||
release_firmware(gpu->pfp);
|
||||
|
||||
msm_gpu_cleanup(&gpu->base);
|
||||
|
||||
if (aspace) {
|
||||
aspace->mmu->funcs->detach(aspace->mmu,
|
||||
iommu_ports, ARRAY_SIZE(iommu_ports));
|
||||
msm_gem_address_space_destroy(aspace);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -702,7 +702,4 @@ void msm_gpu_cleanup(struct msm_gpu *gpu)
|
|||
msm_gem_put_iova(gpu->rb->bo, gpu->id);
|
||||
msm_ringbuffer_destroy(gpu->rb);
|
||||
}
|
||||
|
||||
if (gpu->aspace)
|
||||
msm_gem_address_space_destroy(gpu->aspace);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue