aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLu Baolu <[email protected]>2024-06-10 16:55:39 +0800
committerWill Deacon <[email protected]>2024-07-04 14:09:33 +0100
commit45acf35af200b305d1e6119ca9de47aa4c3c45b9 (patch)
tree992d46c2491c0d8eab76df5af76eefe50e5b5d25
parent9c159f6de1aedf200ac94eace47f6082399b561c (diff)
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 <[email protected]> Acked-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
-rw-r--r--drivers/gpu/drm/msm/msm_iommu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c
index d5512037c38b..2a94e82316f9 100644
--- a/drivers/gpu/drm/msm/msm_iommu.c
+++ b/drivers/gpu/drm/msm/msm_iommu.c
@@ -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);