diff options
author | Jordan Crouse <jcrouse@codeaurora.org> | 2020-05-23 01:03:14 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-05-23 23:37:38 +0300 |
commit | 52da6d513183cf543df6efc95bf504aee0da70d6 (patch) | |
tree | ad3e5114d1eedc9940f5227b0dd53c298fbe8663 /drivers/gpu/drm/msm/adreno/a6xx_gmu.c | |
parent | 7d4eedb03fc754625e0e0c482f42bfeabce685ce (diff) | |
download | linux-52da6d513183cf543df6efc95bf504aee0da70d6.tar.xz |
drm/msm: Attach the IOMMU device during initialization
Everywhere an IOMMU object is created by msm_gpu_create_address_space
the IOMMU device is attached immediately after. Instead of carrying around
the infrastructure to do the attach from the device specific code do it
directly in the msm_iommu_init() function. This gets it out of the way for
more aggressive cleanups that follow.
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
[squash in rebase fixups and fix for unused fxn]
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/adreno/a6xx_gmu.c')
-rw-r--r-- | drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index 8c07850728bc..0c72ae84e279 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -1114,7 +1114,6 @@ static int a6xx_gmu_memory_alloc(struct a6xx_gmu *gmu, struct a6xx_gmu_bo *bo, static int a6xx_gmu_memory_probe(struct a6xx_gmu *gmu) { struct iommu_domain *domain; - int ret; domain = iommu_domain_alloc(&platform_bus_type); if (!domain) @@ -1129,12 +1128,6 @@ static int a6xx_gmu_memory_probe(struct a6xx_gmu *gmu) return PTR_ERR(gmu->aspace); } - ret = gmu->aspace->mmu->funcs->attach(gmu->aspace->mmu); - if (ret) { - msm_gem_address_space_put(gmu->aspace); - return ret; - } - return 0; } |