From a4b74193074815072eb5558af12c0d012b954164 Mon Sep 17 00:00:00 2001 From: "hyesoo.yu" Date: Sun, 3 Jun 2018 17:10:03 +0900 Subject: [PATCH] [COMMON] g2d: remove unnecessary sharable mapping 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 --- drivers/gpu/exynos/g2d/g2d_uapi_process.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/exynos/g2d/g2d_uapi_process.c b/drivers/gpu/exynos/g2d/g2d_uapi_process.c index eebe9690fb90..25033ebf01b5 100644 --- a/drivers/gpu/exynos/g2d/g2d_uapi_process.c +++ b/drivers/gpu/exynos/g2d/g2d_uapi_process.c @@ -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; -- 2.20.1