diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2016-06-17 10:54:24 +0300 |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2016-07-13 17:06:05 +0300 |
commit | c04d9eb77340aedeaa8ffd79ed0957c8289d84d3 (patch) | |
tree | 7d0fd54e3c7891ba5d82b5358932ada43e5f10c8 /drivers/gpu | |
parent | f7c72773de88fa3d4b51d4eb2bd2a89b746aaf54 (diff) | |
download | linux-c04d9eb77340aedeaa8ffd79ed0957c8289d84d3.tar.xz |
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 <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_iommu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.c b/drivers/gpu/drm/exynos/exynos_drm_iommu.c index 1e82529e0c41..36dde9691274 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_iommu.c +++ b/drivers/gpu/drm/exynos/exynos_drm_iommu.c @@ -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) |