gralloc: Use ION fd in FB handle

- After mmap, use the meta data ioctl to get the ION fd
  for the framebuffer memory as GPU expects buffers to
  from ION
- Set appropriate flags for the framebuffer private handle
- Remove unused members

Change-Id: I45c4917d9811cd3b3800adf222b92f41f97430c0
This commit is contained in:
Arun Kumar K.R
2014-03-17 16:03:21 -07:00
parent 1c47cede92
commit f0f853f442
4 changed files with 47 additions and 19 deletions

View File

@@ -224,9 +224,11 @@ int gpu_context_t::gralloc_alloc_framebuffer_locked(int usage,
// create a "fake" handle for it
uint64_t vaddr = uint64_t(m->framebuffer->base);
// As GPU needs ION FD, the private handle is created
// using ION fd and ION flags are set
private_handle_t* hnd = new private_handle_t(
dup(m->framebuffer->fd), bufferSize,
private_handle_t::PRIV_FLAGS_USES_PMEM |
private_handle_t::PRIV_FLAGS_USES_ION |
private_handle_t::PRIV_FLAGS_FRAMEBUFFER,
BUFFER_TYPE_UI, m->fbFormat, m->info.xres,
m->info.yres);