Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 958cef19 authored by Tharun Kumar Merugu's avatar Tharun Kumar Merugu Committed by Gerrit - the friendly Code Review server
Browse files

msm: adsprpc: skip CPU cache synchronization for non-coherent buffers



Skip synchronization of CPU cache for fastrpc buffers registered
as non-coherent, by DMA mapping them with the appropriate attribute
as the fastrpc driver will take care of cache maintenance.

Change-Id: I1e067270345eaa320ede76fc12ec450c341ca87a
Acked-by: default avatarThyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent 8f2d81a9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -859,7 +859,8 @@ static int fastrpc_mmap_create(struct fastrpc_file *fl, int fd,
		if (map->attr & FASTRPC_ATTR_NON_COHERENT ||
			(sess->smmu.coherent && map->uncached))
			map->attach->dma_map_attrs |=
				DMA_ATTR_FORCE_NON_COHERENT;
				DMA_ATTR_FORCE_NON_COHERENT |
				DMA_ATTR_SKIP_CPU_SYNC;
		else if (map->attr & FASTRPC_ATTR_COHERENT)
			map->attach->dma_map_attrs |= DMA_ATTR_FORCE_COHERENT;