Lines Matching refs:m
116 static int fb_get_framebuffer_dmabuf(private_module_t *m, private_handle_t *hnd) in fb_get_framebuffer_dmabuf() argument
120 res = ioctl(m->framebuffer->fd, FBIOGET_DMABUF, &fb_dma_buf); in fb_get_framebuffer_dmabuf()
203 private_module_t *m = reinterpret_cast<private_module_t *>(dev->common.module); in gralloc_alloc_buffer() local
226 ret = alloc_ion_fd(m->ion_client, size, heap_mask, 0, &shared_fd); in gralloc_alloc_buffer()
228 AERR("Failed to ion_alloc_fd from ion_client:%d", m->ion_client); in gralloc_alloc_buffer()
245 AERR("ion_map( %d ) failed", m->ion_client); in gralloc_alloc_buffer()
263 AERR("Gralloc out of mem for ion_client:%d", m->ion_client); in gralloc_alloc_buffer()
369 private_module_t *m = reinterpret_cast<private_module_t *>(dev->common.module); in gralloc_alloc_framebuffer_locked() local
372 if (m->framebuffer == NULL) in gralloc_alloc_framebuffer_locked()
375 int err = init_frame_buffer_locked(m); in gralloc_alloc_framebuffer_locked()
383 uint32_t bufferMask = m->bufferMask; in gralloc_alloc_framebuffer_locked()
384 const uint32_t numBuffers = m->numBuffers; in gralloc_alloc_framebuffer_locked()
385 const size_t bufferSize = m->finfo.line_length * m->info.yres; in gralloc_alloc_framebuffer_locked()
393 AERR("fallback to single buffering. Virtual Y-res too small %d", m->info.yres); in gralloc_alloc_framebuffer_locked()
401 m->bufferMask = 0; in gralloc_alloc_framebuffer_locked()
404 void *vaddr = m->framebuffer->base; in gralloc_alloc_framebuffer_locked()
411 m->bufferMask |= (1LU << i); in gralloc_alloc_framebuffer_locked()
420 …0, m->framebuffer->fd, (uintptr_t)vaddr - (uintptr_t) m->framebuffer->base, m->framebuffer->fb_pad… in gralloc_alloc_framebuffer_locked()
423 hnd->ump_id = m->framebuffer->ump_id; in gralloc_alloc_framebuffer_locked()
445 if (fb_get_framebuffer_dmabuf(m, hnd) == -1) in gralloc_alloc_framebuffer_locked()
470 private_module_t *m = reinterpret_cast<private_module_t *>(dev->common.module); in gralloc_alloc_framebuffer() local
471 pthread_mutex_lock(&m->lock); in gralloc_alloc_framebuffer()
473 pthread_mutex_unlock(&m->lock); in gralloc_alloc_framebuffer()
712 private_module_t *m = reinterpret_cast<private_module_t *>(device); in alloc_device_close() local
714 if (0 != ion_close(m->ion_client)) in alloc_device_close()
716 AERR("Failed to close ion_client: %d", m->ion_client); in alloc_device_close()
719 close(m->ion_client); in alloc_device_close()
778 static int initialize_interface(private_module_t *m) in initialize_interface() argument
797 m->ion_client = ion_open(); in initialize_interface()
798 if (m->ion_client < 0) { in initialize_interface()
802 if (!ion_is_legacy(m->ion_client)) { in initialize_interface()
803 system_heap_id = find_heap_id(m->ion_client, ION_SYSTEM); in initialize_interface()
804 cma_heap_id = find_heap_id(m->ion_client, ION_CMA); in initialize_interface()
806 ion_close(m->ion_client); in initialize_interface()
807 m->ion_client = -1; in initialize_interface()
860 private_module_t *m = reinterpret_cast<private_module_t *>(dev->common.module); in alloc_device_open() local
862 if (initialize_interface(m) < 0) { in alloc_device_open()