Skip to content

Commit e2a88ea

Browse files
rmurphy-armrobclark
authored andcommitted
drm/msm: Stop using iommu_present()
Even if some IOMMU has registered itself on the platform "bus", that doesn't necessarily mean it provides translation for the device we care about. Replace iommu_present() with a more appropriate check. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Patchwork: https://patchwork.freedesktop.org/patch/480707/ Link: https://lore.kernel.org/r/5ab4f4574d7f3e042261da702d493ee40d003356.1649168268.git.robin.murphy@arm.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent 047ae66 commit e2a88ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/msm/msm_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ bool msm_use_mmu(struct drm_device *dev)
274274
struct msm_drm_private *priv = dev->dev_private;
275275

276276
/* a2xx comes with its own MMU */
277-
return priv->is_a2xx || iommu_present(&platform_bus_type);
277+
return priv->is_a2xx || device_iommu_mapped(dev->dev);
278278
}
279279

280280
static int msm_init_vram(struct drm_device *dev)

0 commit comments

Comments
 (0)