Merge "libgralloc-qsd8k: Invalidate the ashmem cache" into gingerbread

This commit is contained in:
Linux Build Service Account 2011-08-09 19:50:24 -07:00 committed by QuIC Gerrit Code Review
commit 538b533126

View File

@ -21,6 +21,10 @@
#include <sys/mman.h>
#ifdef HOST
#include <linux/ashmem.h>
#endif
#include "gr.h"
#include "gpu.h"
@ -154,6 +158,11 @@ int gpu_context_t::alloc_ashmem_buffer(size_t size, unsigned int postfix, void**
*pFd = fd;
*pBase = base;
*pOffset = offset;
#ifdef HOST
if (ioctl(fd, ASHMEM_CACHE_INV_RANGE, NULL)) {
LOGE("ASHMEM_CACHE_INV_RANGE failed fd = %d", fd);
}
#endif
}
return err;
}