liboverlay: Allocate cached rotator buffers
- gralloc does not invalidate and clean the cached buffers.
- Using cached buffers for rotator does not add any benefit as
rotator doesn't touch the L2 cache. Since no one accesses the
memory but the rotator and mdp, so make rotator buffers uncached
Change-Id: I3dc3c91afb2fc07b7473662323339aac1cea3d73
diff --git a/liboverlay/overlayMem.h b/liboverlay/overlayMem.h
index 5fbe91b..061d197 100644
--- a/liboverlay/overlayMem.h
+++ b/liboverlay/overlayMem.h
@@ -121,8 +121,9 @@
if(isSecure) {
allocFlags = GRALLOC_USAGE_PRIVATE_MM_HEAP;
allocFlags |= GRALLOC_USAGE_PROTECTED;
- allocFlags |= GRALLOC_USAGE_PRIVATE_UNCACHED;
}
+ // Allocate uncached rotator buffers
+ allocFlags |= GRALLOC_USAGE_PRIVATE_UNCACHED;
int err = 0;
OVASSERT(numbufs && bufSz, "numbufs=%d bufSz=%d", numbufs, bufSz);