Skip to content

Commit 45acf35

Browse files
LuBaoluwilldeacon
authored andcommitted
drm/msm: Use iommu_paging_domain_alloc()
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>
1 parent 9c159f6 commit 45acf35

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/gpu/drm/msm/msm_iommu.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,13 @@ struct msm_mmu *msm_iommu_new(struct device *dev, unsigned long quirks)
407407
struct msm_iommu *iommu;
408408
int ret;
409409

410-
domain = iommu_domain_alloc(dev->bus);
411-
if (!domain)
410+
if (!device_iommu_mapped(dev))
412411
return NULL;
413412

413+
domain = iommu_paging_domain_alloc(dev);
414+
if (IS_ERR(domain))
415+
return ERR_CAST(domain);
416+
414417
iommu_set_pgtable_quirks(domain, quirks);
415418

416419
iommu = kzalloc(sizeof(*iommu), GFP_KERNEL);

0 commit comments

Comments
 (0)