Lines Matching refs:helper_buffer
49 struct heap_helper_buffer *helper_buffer; in cma_heap_allocate() local
61 helper_buffer = kzalloc(sizeof(*helper_buffer), GFP_KERNEL); in cma_heap_allocate()
62 if (!helper_buffer) in cma_heap_allocate()
65 init_heap_helper_buffer(helper_buffer, cma_heap_free); in cma_heap_allocate()
66 helper_buffer->heap = heap; in cma_heap_allocate()
67 helper_buffer->size = len; in cma_heap_allocate()
96 helper_buffer->pagecount = nr_pages; in cma_heap_allocate()
97 helper_buffer->pages = kmalloc_array(helper_buffer->pagecount, in cma_heap_allocate()
98 sizeof(*helper_buffer->pages), in cma_heap_allocate()
100 if (!helper_buffer->pages) { in cma_heap_allocate()
105 for (pg = 0; pg < helper_buffer->pagecount; pg++) in cma_heap_allocate()
106 helper_buffer->pages[pg] = &cma_pages[pg]; in cma_heap_allocate()
109 dmabuf = heap_helper_export_dmabuf(helper_buffer, fd_flags); in cma_heap_allocate()
115 helper_buffer->dmabuf = dmabuf; in cma_heap_allocate()
116 helper_buffer->priv_virt = cma_pages; in cma_heap_allocate()
128 kfree(helper_buffer->pages); in cma_heap_allocate()
132 kfree(helper_buffer); in cma_heap_allocate()