diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2015-06-03 11:26:23 +0300 |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2015-06-19 18:33:00 +0300 |
commit | 452868581da254b03c54912f8f780bd0a4d3bcfb (patch) | |
tree | 14626c82048816889df2030991ded8c37ce5b88b /drivers/gpu/drm/exynos/exynos_drm_iommu.c | |
parent | fb88e2141222ad93c594f2babc806d71cfb65e0d (diff) | |
download | linux-452868581da254b03c54912f8f780bd0a4d3bcfb.tar.xz |
drm/exynos: iommu: detach from default dma-mapping domain on init
This patch adds code, which detach sub-device nodes from default iommu
domain if such has been configured. This lets Exynos DRM driver to properly
attach sub-devices to its own, common for all sub-devices domain.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_iommu.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_iommu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.c b/drivers/gpu/drm/exynos/exynos_drm_iommu.c index b32b291f88ff..323601a52a25 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_iommu.c +++ b/drivers/gpu/drm/exynos/exynos_drm_iommu.c @@ -100,6 +100,9 @@ int drm_iommu_attach_device(struct drm_device *drm_dev, dma_set_max_seg_size(subdrv_dev, 0xffffffffu); + if (subdrv_dev->archdata.mapping) + arm_iommu_detach_device(subdrv_dev); + ret = arm_iommu_attach_device(subdrv_dev, dev->archdata.mapping); if (ret < 0) { DRM_DEBUG_KMS("failed iommu attach.\n"); |