summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2016-06-17 09:54:24 +0200
committerInki Dae <daeinki@gmail.com>2016-07-13 23:06:05 +0900
commitc04d9eb77340aedeaa8ffd79ed0957c8289d84d3 (patch)
tree7d0fd54e3c7891ba5d82b5358932ada43e5f10c8 /drivers/gpu/drm/exynos
parentf7c72773de88fa3d4b51d4eb2bd2a89b746aaf54 (diff)
downloadop-kernel-dev-c04d9eb77340aedeaa8ffd79ed0957c8289d84d3.zip
op-kernel-dev-c04d9eb77340aedeaa8ffd79ed0957c8289d84d3.tar.gz
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/drm/exynos')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_iommu.c5
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 1e82529..36dde96 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)
OpenPOWER on IntegriCloud