Merge "gralloc: Mark framebuffer as ION memory"

This commit is contained in:
Linux Build Service Account
2012-12-15 21:35:59 -08:00
committed by Gerrit - the friendly Code Review server
2 changed files with 8 additions and 9 deletions

View File

@@ -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);

View File

@@ -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);