aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c')
-rw-r--r--drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c31
1 files changed, 6 insertions, 25 deletions
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
index 3d5621a68f85..d2a48caf9d27 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
@@ -557,7 +557,6 @@ static int mdp5_kms_init(struct drm_device *dev)
struct msm_kms *kms;
struct msm_gem_address_space *aspace;
int irq, i, ret;
- struct device *iommu_dev;
ret = mdp5_init(to_platform_device(dev->dev), dev);
@@ -601,32 +600,14 @@ static int mdp5_kms_init(struct drm_device *dev)
}
mdelay(16);
- if (config->platform.iommu) {
- struct msm_mmu *mmu;
-
- iommu_dev = &pdev->dev;
- if (!dev_iommu_fwspec_get(iommu_dev))
- iommu_dev = iommu_dev->parent;
-
- mmu = msm_iommu_new(iommu_dev, config->platform.iommu);
-
- aspace = msm_gem_address_space_create(mmu, "mdp5",
- 0x1000, 0x100000000 - 0x1000);
-
- if (IS_ERR(aspace)) {
- if (!IS_ERR(mmu))
- mmu->funcs->destroy(mmu);
- ret = PTR_ERR(aspace);
- goto fail;
- }
-
- kms->aspace = aspace;
- } else {
- DRM_DEV_INFO(&pdev->dev,
- "no iommu, fallback to phys contig buffers for scanout\n");
- aspace = NULL;
+ aspace = msm_kms_init_aspace(mdp5_kms->dev);
+ if (IS_ERR(aspace)) {
+ ret = PTR_ERR(aspace);
+ goto fail;
}
+ kms->aspace = aspace;
+
pm_runtime_put_sync(&pdev->dev);
ret = modeset_init(mdp5_kms);