From ae90b11d2055c691ad3058efc4f6a2f7a1c0bf82 Mon Sep 17 00:00:00 2001 From: "hyesoo.yu" Date: Thu, 31 May 2018 18:07:55 +0900 Subject: [PATCH] [COMMON] ion: set sharable mapping for dma coherent device Change-Id: Ia2c32882772adc6a8f8cce3a4de28f24d44f9e98 Signed-off-by: hyesoo.yu --- drivers/staging/android/ion/ion_exynos.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/android/ion/ion_exynos.c b/drivers/staging/android/ion/ion_exynos.c index 5b3c07a87280..5e30b6a8163d 100644 --- a/drivers/staging/android/ion/ion_exynos.c +++ b/drivers/staging/android/ion/ion_exynos.c @@ -103,6 +103,8 @@ dma_addr_t ion_iovmm_map(struct dma_buf_attachment *attachment, if (!ion_buffer_cached(buffer)) prop &= ~IOMMU_CACHE; + else if (device_get_dma_attr(attachment->dev) == DEV_DMA_COHERENT) + prop |= IOMMU_CACHE; list_for_each_entry(iovm_map, &buffer->iovas, list) { if ((domain == iovm_map->domain) && (prop == iovm_map->prop)) { -- 2.20.1