From 0322ae55d34765aacba4887fbdeae89ec88a3d65 Mon Sep 17 00:00:00 2001 From: Naseer Ahmed Date: Mon, 26 Dec 2011 13:56:30 +0530 Subject: [PATCH] gralloc: Make all pmem buffers cacheable by default If an uncached buffer is needed from gralloc, the client must use the flag GRALLOC_USAGE_PRIVATE_UNCACHED Change-Id: Ie3fcfee1071a87fa0440600f4ca3e2d7ff6243ed --- libgralloc/alloc_controller.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libgralloc/alloc_controller.cpp b/libgralloc/alloc_controller.cpp index 2fa7e1a..4d471bd 100644 --- a/libgralloc/alloc_controller.cpp +++ b/libgralloc/alloc_controller.cpp @@ -256,16 +256,8 @@ int PmemAshmemController::allocate(alloc_data& data, int usage, { int ret = 0; - // Decide caching - // Decide based on usage - uint32_t uread = usage & GRALLOC_USAGE_SW_READ_MASK; - uint32_t uwrite = usage & GRALLOC_USAGE_SW_WRITE_MASK; - if (uread == GRALLOC_USAGE_SW_READ_OFTEN || - uwrite == GRALLOC_USAGE_SW_WRITE_OFTEN) { + // Make buffers cacheable by default data.uncached = false; - } else { - data.uncached = true; - } // Override if we explicitly need uncached buffers if (usage & GRALLOC_USAGE_PRIVATE_UNCACHED)