Merge "gralloc: Mark framebuffer as ION memory"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
d74f5f3e4c
@@ -328,7 +328,7 @@ int mapFrameBufferLocked(struct private_module_t* module)
|
||||
size_t fbSize = roundUpToPageSize(finfo.line_length * info.yres)*
|
||||
module->numBuffers;
|
||||
module->framebuffer = new private_handle_t(fd, fbSize,
|
||||
private_handle_t::PRIV_FLAGS_USES_PMEM,
|
||||
private_handle_t::PRIV_FLAGS_USES_ION,
|
||||
BUFFER_TYPE_UI,
|
||||
module->fbFormat, info.xres, info.yres);
|
||||
void* vaddr = mmap(0, fbSize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
|
||||
@@ -83,12 +83,11 @@ int gpu_context_t::gralloc_alloc_framebuffer_locked(size_t size, int usage,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
// create a "fake" handles for it
|
||||
// Set the PMEM flag as well, since adreno
|
||||
// treats the FB memory as pmem
|
||||
// create a "fake" handle for it
|
||||
intptr_t vaddr = intptr_t(m->framebuffer->base);
|
||||
private_handle_t* hnd = new private_handle_t(dup(m->framebuffer->fd), bufferSize,
|
||||
private_handle_t::PRIV_FLAGS_USES_PMEM |
|
||||
private_handle_t* hnd = new private_handle_t(
|
||||
dup(m->framebuffer->fd), bufferSize,
|
||||
private_handle_t::PRIV_FLAGS_USES_ION |
|
||||
private_handle_t::PRIV_FLAGS_FRAMEBUFFER,
|
||||
BUFFER_TYPE_UI, m->fbFormat, m->info.xres,
|
||||
m->info.yres);
|
||||
|
||||
Reference in New Issue
Block a user