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>
This commit is contained in:
parent
fb88e21412
commit
452868581d
|
@ -100,6 +100,9 @@ int drm_iommu_attach_device(struct drm_device *drm_dev,
|
||||||
|
|
||||||
dma_set_max_seg_size(subdrv_dev, 0xffffffffu);
|
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);
|
ret = arm_iommu_attach_device(subdrv_dev, dev->archdata.mapping);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
DRM_DEBUG_KMS("failed iommu attach.\n");
|
DRM_DEBUG_KMS("failed iommu attach.\n");
|
||||||
|
|
Loading…
Reference in New Issue