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

Commit 8a232c09 authored by Taniya Das's avatar Taniya Das
Browse files

arm: dma-removed: Add option to skip buffer zeroing



The DMA framework currently zeros all buffers because it (righfully so)
assumes that drivers will soon need to pass the memory to a device.
Some devices/use case may not require zeroed memory and there can
be an increase in performance if we skip the zeroing. Use the
DMA_ATTR_SKIP_ZEROING attr to allow skipping of DMA zeroing.

Change-Id: Ie7a8ae547834c29a6a4f327095e099c53526f3f7
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent 8363bc8c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ void *removed_alloc(struct device *dev, size_t size, dma_addr_t *handle,
		if (WARN_ON(!addr)) {
			dma_release_from_contiguous(dev, pfn, order);
		} else {
			if (!dma_get_attr(DMA_ATTR_SKIP_ZEROING, attrs))
				memset(addr, 0, size);
			if (no_kernel_mapping) {
				iounmap(addr);