display: Use cache invalidate and clean correctly
Make sure cache is invalidated before reading in software and
cleaned after writing in software.
Change-Id: I91c471c47a5f1ff11f9960f08091a17ffe575534
diff --git a/libgralloc/memalloc.h b/libgralloc/memalloc.h
index 73ac652..664bfa2 100644
--- a/libgralloc/memalloc.h
+++ b/libgralloc/memalloc.h
@@ -34,6 +34,12 @@
namespace gralloc {
+enum {
+ CACHE_CLEAN = 0x1,
+ CACHE_INVALIDATE,
+ CACHE_CLEAN_AND_INVALIDATE,
+};
+
struct alloc_data {
void *base;
int fd;
@@ -68,7 +74,7 @@
// Clean and invalidate
virtual int clean_buffer(void *base, size_t size,
- int offset, int fd) = 0;
+ int offset, int fd, int op) = 0;
// Destructor
virtual ~IMemAlloc() {};