only set the PRIV_FLAGS_NEEDS_FLUSH flag on PMEM buffers
PRIV_FLAGS_NEEDS_FLUSH will trigger an ioctl call into the PMEM driver in unlock(), so it makes not sense to set this flag for non pmem buffers. Change-Id: Ie1e077c10df86d3689b82fa6ce5d6c856fc95688
This commit is contained in:
parent
6abac7a69e
commit
361e52090e
@ -238,8 +238,14 @@ int gralloc_lock(gralloc_module_t const* module,
|
||||
|
||||
// if requesting sw write for non-framebuffer handles, flag for
|
||||
// flushing at unlock
|
||||
|
||||
const uint32_t pmemMask =
|
||||
private_handle_t::PRIV_FLAGS_USES_PMEM |
|
||||
private_handle_t::PRIV_FLAGS_USES_PMEM_ADSP;
|
||||
|
||||
if ((usage & GRALLOC_USAGE_SW_WRITE_MASK) &&
|
||||
!(hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER)) {
|
||||
(hnd->flags & pmemMask) &&
|
||||
!(hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER)) {
|
||||
hnd->flags |= private_handle_t::PRIV_FLAGS_NEEDS_FLUSH;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user