libgralloc-qsd8k: Invalidate the ashmem cache
Invalidate the ashmem cache after allocating an ashmem buffer Change-Id: Id38a4776a80a9b1d8be7fe6bf00f8b187a3278f6
This commit is contained in:
parent
bfe4f06ee4
commit
e8ded16374
@ -21,6 +21,9 @@
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include <cutils/properties.h>
|
||||
#ifdef HOST
|
||||
#include <linux/ashmem.h>
|
||||
#endif
|
||||
|
||||
#include "gr.h"
|
||||
#include "gpu.h"
|
||||
@ -178,6 +181,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…
x
Reference in New Issue
Block a user