[COMMON] g2d: remove unnecessary sharable mapping
authorhyesoo.yu <hyesoo.yu@samsung.com>
Sun, 3 Jun 2018 08:10:03 +0000 (17:10 +0900)
committerJanghyuck Kim <janghyuck.kim@samsung.com>
Mon, 23 Jul 2018 05:39:28 +0000 (14:39 +0900)
e3364c5c3c68 [COMMON] iommu/exynos: set sharable mapping for dma coherent device
6d648acaeb84 [COMMON] ion: set sharable mapping for dma coherent device

The iovmm mapping of dma coherent device is always
treated sharable mapping on exynos for cachable
memory.

Change-Id: I7b770f90f2a6cb3af8c6ef987109a33b747325a3
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
drivers/gpu/exynos/g2d/g2d_uapi_process.c

index eebe9690fb90ded330641bfcb927c8103d453ba8..25033ebf01b520bd8488f620d23ae1216689d564 100644 (file)
@@ -202,9 +202,6 @@ static int g2d_get_dmabuf(struct g2d_task *task,
        int ret = -EINVAL;
        int prot = IOMMU_READ;
 
-       if (device_get_dma_attr(dev) == DEV_DMA_COHERENT)
-               prot |= IOMMU_CACHE;
-
        if (!IS_HWFC(task->flags) || (dir == DMA_TO_DEVICE)) {
                dmabuf = dma_buf_get(data->dmabuf.fd);
                if (IS_ERR(dmabuf)) {
@@ -335,13 +332,9 @@ static int g2d_get_userptr(struct g2d_task *task,
 
        if (dir != DMA_TO_DEVICE)
                prot |= IOMMU_WRITE;
-       if (is_vma_cached(vma)) {
+       if (is_vma_cached(vma))
                task->total_cached_len += buffer->payload;
 
-               if (device_get_dma_attr(dev) == DEV_DMA_COHERENT)
-                       prot |= IOMMU_CACHE;
-       }
-
        buffer->userptr.vma = tvma;
 
        tvma->vm_next = NULL;