drm/exynos: iommu: add a check if all sub-devices have iommu controller

This patch adds a check if all devices belonging to Exynos DRM have the
same dma_map_ops set. This is required to enable operation with IOMMU
enabled.

Signed-off-by: Marek Szyprowski <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
This commit is contained in:
Marek Szyprowski 2016-06-17 09:54:24 +02:00 • committed by Inki Dae
commit c04d9eb773

View file

@ -97,6 +97,11 @@ int drm_iommu_attach_device(struct drm_device *drm_dev,
if (!priv->mapping)
return 0;
if (get_dma_ops(priv->dma_dev) != get_dma_ops(subdrv_dev)) {
DRM_ERROR("Device %s lacks support for IOMMU\n",
dev_name(subdrv_dev));
return -EINVAL;
}
ret = configure_dma_max_seg_size(subdrv_dev);
if (ret)