aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_drm_iommu.c
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2015-06-03 10:26:24 +0200
committerInki Dae <daeinki@gmail.com>2015-06-20 00:33:00 +0900
commitbcfe4e25aa0385dc7bb1061595f8e4d69f74c61d (patch)
treeb1f985b3a518c8f26d3fc6616a44c2479b403842 /drivers/gpu/drm/exynos/exynos_drm_iommu.c
parentdrm/exynos: iommu: detach from default dma-mapping domain on init (diff)
downloadlinux-dev-bcfe4e25aa0385dc7bb1061595f8e4d69f74c61d.tar.xz
linux-dev-bcfe4e25aa0385dc7bb1061595f8e4d69f74c61d.zip
drm/exynos: iommu: improve a check for non-iommu dma_ops
DRM Exynos driver is relying on dma-mapping internal structures when used with IOMMU enabled. This patch partially hides dma-mapping internal things by using proper get_dma_ops/set_dma_ops calls. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_iommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.c b/drivers/gpu/drm/exynos/exynos_drm_iommu.c
index 323601a52a25..34596da7be33 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_iommu.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_iommu.c
@@ -117,8 +117,8 @@ int drm_iommu_attach_device(struct drm_device *drm_dev,
* If iommu attach succeeded, the sub driver would have dma_ops
* for iommu and also all sub drivers have same dma_ops.
*/
- if (!dev->archdata.dma_ops)
- dev->archdata.dma_ops = subdrv_dev->archdata.dma_ops;
+ if (get_dma_ops(dev) == get_dma_ops(NULL))
+ set_dma_ops(dev, get_dma_ops(subdrv_dev));
return 0;
}