]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/msm: Use iommu_paging_domain_alloc()
authorLu Baolu <baolu.lu@linux.intel.com>
Mon, 10 Jun 2024 08:55:39 +0000 (16:55 +0800)
committerWill Deacon <will@kernel.org>
Thu, 4 Jul 2024 13:09:33 +0000 (14:09 +0100)
The domain allocated in msm_iommu_new() is for the @dev. Replace
iommu_domain_alloc() with iommu_paging_domain_alloc() to make it explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240610085555.88197-6-baolu.lu@linux.intel.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/gpu/drm/msm/msm_iommu.c

index d5512037c38bcd7ca807aaf281dceaebdd688a4e..2a94e82316f95c5f9dcc37ef0a4664a29e3492b2 100644 (file)
@@ -407,10 +407,13 @@ struct msm_mmu *msm_iommu_new(struct device *dev, unsigned long quirks)
        struct msm_iommu *iommu;
        int ret;
 
-       domain = iommu_domain_alloc(dev->bus);
-       if (!domain)
+       if (!device_iommu_mapped(dev))
                return NULL;
 
+       domain = iommu_paging_domain_alloc(dev);
+       if (IS_ERR(domain))
+               return ERR_CAST(domain);
+
        iommu_set_pgtable_quirks(domain, quirks);
 
        iommu = kzalloc(sizeof(*iommu), GFP_KERNEL);