Merge "libgralloc-qsd8k: Invalidate the ashmem cache" into gingerbread
This commit is contained in:
commit
538b533126
9
gpu.cpp
9
gpu.cpp
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user