diff options
author | c_mtharu <c_mtharu@qti.qualcomm.com> | 2017-06-09 14:53:48 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-06-11 22:37:30 -0700 |
commit | 71733cb184b5f88c5427520aa0c1f6f14d2f975d (patch) | |
tree | 90c4100cb05d033cd33d2b80107d692bf4b06716 | |
parent | c1a2472056c800ff46e0ac21a4b67c179a570ad0 (diff) |
sdm660: adsprpc: Map uncached buffers as non-coherent
Map un-cached buffers as non io-coherent to avoid snooping overhead.
Change-Id: Iddbde76d6d8a13cd48c737f1046a53a2bc1ef2a5
Acked-by: Viswanatham Paduchuri <vpaduchu@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
-rw-r--r-- | drivers/char/adsprpc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index 14c833691194..9c4d2d092ee4 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) |