]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/exynos: iommu: improve a check for non-iommu dma_ops
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 3 Jun 2015 08:26:24 +0000 (10:26 +0200)
committerInki Dae <daeinki@gmail.com>
Fri, 19 Jun 2015 15:33:00 +0000 (00:33 +0900)
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>
drivers/gpu/drm/exynos/exynos_drm_iommu.c

index 323601a52a2509dc015bbdc2876a31bb7bdc04a4..34596da7be33b3df7a4581b21b35041ba143b540 100644 (file)
@@ -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;
 }