summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-06-13 08:48:36 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-06-13 08:48:36 -0700
commit5d52e10d485a6511af338f339785f8e6bbbc58ff (patch)
tree802de65b6c4efb388a27e35476af4a67769ece2c
parentc0f69934303141559398f571e9263ffe2136fd84 (diff)
parent71733cb184b5f88c5427520aa0c1f6f14d2f975d (diff)
Merge "sdm660: adsprpc: Map uncached buffers as non-coherent"
-rw-r--r--drivers/char/adsprpc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c
index a7c21407a814..ed0226131b90 100644
--- a/drivers/char/adsprpc.c
+++ b/drivers/char/adsprpc.c
@@ -670,7 +670,8 @@ static int fastrpc_mmap_create(struct fastrpc_file *fl, int fd, unsigned attr,
init_dma_attrs(&attrs);
dma_set_attr(DMA_ATTR_EXEC_MAPPING, &attrs);
- if (map->attr & FASTRPC_ATTR_NON_COHERENT)
+ if ((map->attr & FASTRPC_ATTR_NON_COHERENT) ||
+ (sess->smmu.coherent && map->uncached))
dma_set_attr(DMA_ATTR_FORCE_NON_COHERENT,
&attrs);
else if (map->attr & FASTRPC_ATTR_COHERENT)