Skip to content

Commit

Permalink
drm/msm: Stop using iommu_present()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
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 <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
  • Loading branch information
rmurphy-arm authored and robclark committed Apr 11, 2022
1 parent 047ae66 commit e2a88ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/msm/msm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ bool msm_use_mmu(struct drm_device *dev)
struct msm_drm_private *priv = dev->dev_private;

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

static int msm_init_vram(struct drm_device *dev)
Expand Down

0 comments on commit e2a88ea

Please sign in to comment.