From 52da6d513183cf543df6efc95bf504aee0da70d6 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Fri, 22 May 2020 16:03:14 -0600 Subject: 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 Signed-off-by: Jordan Crouse Tested-by: Shawn Guo [squash in rebase fixups and fix for unused fxn] Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'drivers/gpu/drm/msm/adreno/a6xx_gmu.c') 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; } -- cgit v1.2.3