libgralloc-qsd8k: Invalidate the ashmem cache
Invalidate the ashmem cache after allocating an ashmem buffer. Change-Id: I874711297c983d64646e069c17c1f2880c4af3d9
This commit is contained in:
parent
7d0082bc06
commit
c114ff7aed
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