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

Commit 12846026 authored by Isaac J. Manjarres's avatar Isaac J. Manjarres Committed by Suren Baghdasaryan
Browse files

ANDROID: GKI: dma-buf: Add support for mapping buffers with DMA attributes



When mapping the memory represented by a dma-buf into a device's
address space, it might be desireable to map the memory with
certain DMA attributes. Thus, introduce the dma_mapping_attrs
field in the dma_buf_attachment structure so that when
the memory is mapped with dma_buf_map_attachment, it is mapped
with the desired DMA attributes.

Bug: 133508579
Test: ion-unit-tests
Change-Id: Ib2e5bafdc02ae31a58ce96a82d77cc508dd71bd4
Signed-off-by: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
Signed-off-by: default avatarSandeep Patil <sspatil@google.com>

[surenb: cherry-picked from ACK 5.4 branch]

Bug: 150611569
Test: build
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
Change-Id: I9a8b4f83a61bcff6e5d3ee2d7f4887875a9654ef
parent bf42ce70
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -369,6 +369,8 @@ struct dma_buf {
 * @dev: device attached to the buffer.
 * @node: list of dma_buf_attachment.
 * @priv: exporter specific attachment data.
 * @dma_map_attrs: DMA attributes to be used when the exporter maps the buffer
 * through dma_buf_map_attachment.
 *
 * This structure holds the attachment information between the dma_buf buffer
 * and its user device(s). The list contains one attachment struct per device
@@ -384,6 +386,7 @@ struct dma_buf_attachment {
	struct device *dev;
	struct list_head node;
	void *priv;
	unsigned long dma_map_attrs;
};

/**