summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHridya Valsaraju <hridya@google.com>2021-07-21 20:56:53 -0700
committerCraig Dooley <dooleyc@google.com>2021-07-22 20:19:04 +0000
commitbea496add63f65a116f684f78eafaf865b056f1e (patch)
treeb09192bad50d033877907491d4faab27dabb87df
parentd40e87e5fb22c652b228550e48a9e8ff0b84fc59 (diff)
downloadaoc-bea496add63f65a116f684f78eafaf865b056f1e.tar.gz
aoc: physical_heap: map buffers as uncached
All buffers allocated from the physical heap are uncached. Hence, when using vmap()to the map the buffer to memset(), map it as uncached so that a cache flush is not required. Test: atest CtsSensorTestCases: android.hardware.cts.SensorNativeTest#testNative Bug: 192086715 Change-Id: I630c9c88651513aeb5d45323661a0f9d17e94adb
-rw-r--r--ion_physical_heap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ion_physical_heap.c b/ion_physical_heap.c
index aed4d18..30c8250 100644
--- a/ion_physical_heap.c
+++ b/ion_physical_heap.c
@@ -68,7 +68,7 @@ static int _sglist_zero(struct scatterlist *sgl, unsigned int nents,
static int _buffer_zero(struct samsung_dma_buffer *buffer)
{
- pgprot_t pgprot = PAGE_KERNEL;
+ pgprot_t pgprot = pgprot_writecombine(PAGE_KERNEL);
return _sglist_zero(buffer->sg_table.sgl, buffer->sg_table.orig_nents, pgprot);
}
@@ -209,7 +209,7 @@ struct dma_heap *ion_physical_heap_create(phys_addr_t base, size_t size,
page = pfn_to_page(PFN_DOWN(base));
- ret = _pages_zero(page, size, PAGE_KERNEL);
+ ret = _pages_zero(page, size, pgprot_writecombine(PAGE_KERNEL));
if (ret)
return ERR_PTR(ret);