提交 b5c7d197 编写于 作者: R Robin Murphy 提交者: Liviu Dudau

drm/arm/malidp: Stop using iommu_present()

iommu_get_domain_for_dev() is already perfectly happy to return NULL
if the given device has no IOMMU. Drop the unnecessary check.
Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/5049994e6c2ba92c2f30d51850c8929136d0f8ca.1649167878.git.robin.murphy@arm.com
上级 c8f76c37
...@@ -310,17 +310,13 @@ static int malidp_se_check_scaling(struct malidp_plane *mp, ...@@ -310,17 +310,13 @@ static int malidp_se_check_scaling(struct malidp_plane *mp,
static u32 malidp_get_pgsize_bitmap(struct malidp_plane *mp) static u32 malidp_get_pgsize_bitmap(struct malidp_plane *mp)
{ {
u32 pgsize_bitmap = 0; struct iommu_domain *mmu_dom;
if (iommu_present(&platform_bus_type)) {
struct iommu_domain *mmu_dom =
iommu_get_domain_for_dev(mp->base.dev->dev);
mmu_dom = iommu_get_domain_for_dev(mp->base.dev->dev);
if (mmu_dom) if (mmu_dom)
pgsize_bitmap = mmu_dom->pgsize_bitmap; return mmu_dom->pgsize_bitmap;
}
return pgsize_bitmap; return 0;
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册