Lines Matching defs:hnd
162 private_handle_t* hnd = new private_handle_t(dup(m->framebuffer->fd), size,
175 hnd->base = vaddr;
176 hnd->offset = vaddr - intptr_t(m->framebuffer->base);
177 *pHandle = hnd;
435 private_handle_t* hnd = new private_handle_t(fd, size, flags);
439 err = mapBuffer(module, hnd);
441 *pHandle = hnd;
446 hnd->offset = offset;
447 hnd->base = int(base)+offset;
448 hnd->gpu_fd = gpu_fd;
449 hnd->map_offset = m->fb_map_offset;
450 *pHandle = hnd;
524 private_handle_t const* hnd = reinterpret_cast<private_handle_t const*>(handle);
525 if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) {
530 hnd->base - m->framebuffer->base) / bufferSize;
533 if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_PMEM) {
534 if (hnd->fd >= 0) {
535 struct pmem_region sub = { hnd->offset, hnd->size };
536 int err = ioctl(hnd->fd, PMEM_UNMAP, &sub);
539 strerror(errno), hnd->fd, hnd->offset, hnd->size);
544 sAllocator.deallocate(hnd->offset);
547 } else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_GPU) {
548 ALOGD("freeing GPU buffer at %d", hnd->offset);
549 sAllocatorGPU.deallocate(hnd->offset);
554 terminateBuffer(module, const_cast<private_handle_t*>(hnd));
557 close(hnd->fd);
558 delete hnd;