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

Commit 679ede30 authored by Rohit Vaswani's avatar Rohit Vaswani Committed by Patrick Daly
Browse files

common: DMA-mapping: add NO_DELAYED_UNMAP attribute



DMA_ATTR_NO_DELAYED_UNMAP specifies to the msm lazy mapping
driver that this buffer should be immediately unmapped once
it is freed.

Change-Id: I43e6a6058705502cf91bf5f0c530c3099cba06ae
Signed-off-by: default avatarRohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent 91e4dc43
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -135,3 +135,13 @@ of mapping (no unaligned accesses, no re-ordering, no write merging, no
buffering, no pre-fetching). This has severe performance penalties and
should not be used for general purpose DMA allocations. It should only
be used if one of the restrictions on strongly ordered memory is required.

DMA_ATTR_NO_DELAYED_UNMAP
-------------------------

DMA_ATTR_NO_DELAYED_UNMAP is used only by the msm specific lazy mapping
feature. By default, the lazy mapping and unmapping holds an additional
reference so that when the buffer is freed, the mapping is not destroyed
and can be re-used. By specifying this attribute, an additional reference
will NOT be held by the lazy mapping code and it will be released as soon
as the buffer is freed.
+6 −0
Original line number Diff line number Diff line
@@ -66,6 +66,12 @@
 * DMA_ATTR_SKIP_ZEROING: Do not zero mapping.
 */
#define DMA_ATTR_SKIP_ZEROING		(1UL << 9)
/*
 * DMA_ATTR_NO_DELAYED_UNMAP: Used by msm specific lazy mapping to indicate
 * that the mapping can be freed on unmap, rather than when the ion_buffer
 * is freed.
 */
#define DMA_ATTR_NO_DELAYED_UNMAP	(1UL << 10)

/*
 * A dma_addr_t can hold any valid DMA or bus address for the platform.