libgralloc-qsd8k: Use correct vaddr for clean/invalidate pmem regions
CRs-fixed: 304740 Change-Id: Id72bb9ae874a56be89aec79d23e8d2e79856409d
This commit is contained in:
parent
538b533126
commit
53b841987e
@ -294,8 +294,8 @@ int gralloc_unlock(gralloc_module_t const* module,
|
||||
err = ioctl(hnd->fd, ASHMEM_CACHE_FLUSH_RANGE, NULL);
|
||||
}
|
||||
|
||||
LOGE_IF(err < 0, "cannot flush handle %p (offs=%x len=%x)\n",
|
||||
hnd, hnd->offset, hnd->size);
|
||||
LOGE_IF(err < 0, "cannot flush handle %p (offs=%x len=%x, flags = 0x%x) err=%s\n",
|
||||
hnd, hnd->offset, hnd->size, hnd->flags, strerror(errno));
|
||||
hnd->flags &= ~private_handle_t::PRIV_FLAGS_NEEDS_FLUSH;
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,10 @@ int PmemUserspaceAllocator::alloc_pmem_buffer(size_t size, int usage,
|
||||
LOGV("%s: mapped fd %d at offset %d, size %d", pmemdev, fd, offset, size);
|
||||
memset((char*)base + offset, 0, size);
|
||||
//Clean cache before flushing to ensure pmem is properly flushed
|
||||
deps.cleanPmem(fd, (unsigned long) base, offset, size);
|
||||
err = deps.cleanPmem(fd, (unsigned long) base + offset, offset, size);
|
||||
if (err < 0) {
|
||||
LOGE("cleanPmem failed: (%s)", strerror(deps.getErrno()));
|
||||
}
|
||||
#ifdef HOST
|
||||
cacheflush(intptr_t(base) + offset, intptr_t(base) + offset + size, 0);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user