From 873b6a9a79676faa7743d49cbd5ddb6c7d9b5f79 Mon Sep 17 00:00:00 2001 From: Panneer Arumugam Date: Tue, 20 Mar 2012 23:23:46 -0700 Subject: [PATCH] libgralloc: Clearing PRIV_FLAGS_NOT_MAPPED. - clearing PRIV_FLAGS_NOT_MAPPED if GRALLOC_USAGE_PRIVATE_DO_NOT_MAP flag is not set so mmap can be skipped. Crs-fixed:342782 Change-Id: I01de82dedf08c8c41db179789cc3a9927aa7e221 (cherry picked from commit 67215121cdff9df78d6a80cda442a6bfc7aa27b3) --- libgralloc/alloc_controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libgralloc/alloc_controller.cpp b/libgralloc/alloc_controller.cpp index e5e748c..c76b31b 100644 --- a/libgralloc/alloc_controller.cpp +++ b/libgralloc/alloc_controller.cpp @@ -141,7 +141,8 @@ int IonController::allocate(alloc_data& data, int usage, if(usage & GRALLOC_USAGE_PRIVATE_DO_NOT_MAP) data.allocType = private_handle_t::PRIV_FLAGS_NOT_MAPPED; - + else + data.allocType &= ~(private_handle_t::PRIV_FLAGS_NOT_MAPPED); // if no flags are set, default to // EBI heap, so that bypass can work // we can fall back to system heap if