From dce3b38f5855919f6246cbf0d21ef39b9fd72855 Mon Sep 17 00:00:00 2001 From: Naseer Ahmed Date: Wed, 23 Nov 2011 17:31:59 -0800 Subject: [PATCH] display: Ashmem: use MAP_POPULATE when mapping If the flag is not used, it causes errors with mapping the page tables in the kgsl driver Change-Id: Iaa29eb764aff8a9af4b14fff9fdab60b50759e45 --- libgralloc/ashmemalloc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgralloc/ashmemalloc.cpp b/libgralloc/ashmemalloc.cpp index 49926f8..7102090 100644 --- a/libgralloc/ashmemalloc.cpp +++ b/libgralloc/ashmemalloc.cpp @@ -103,7 +103,7 @@ int AshmemAlloc::map_buffer(void **pBase, size_t size, int offset, int fd) return err; base = mmap(0, size, PROT_READ| PROT_WRITE, - MAP_SHARED, fd, 0); + MAP_SHARED|MAP_POPULATE, fd, 0); *pBase = base; if(base == MAP_FAILED) { LOGD("%s: Failed to map memory in the client: %s",