Lines Matching refs:heap
52 static int dma_heap_buffer_alloc(struct dma_heap *heap, size_t len, in dma_heap_buffer_alloc() argument
67 dmabuf = heap->ops->allocate(heap, len, fd_flags, heap_flags); in dma_heap_buffer_alloc()
81 struct dma_heap *heap; in dma_heap_open() local
83 heap = xa_load(&dma_heap_minors, iminor(inode)); in dma_heap_open()
84 if (!heap) { in dma_heap_open()
90 file->private_data = heap; in dma_heap_open()
99 struct dma_heap *heap = file->private_data; in dma_heap_ioctl_allocate() local
111 fd = dma_heap_buffer_alloc(heap, heap_allocation->len, in dma_heap_ioctl_allocate()
202 void *dma_heap_get_drvdata(struct dma_heap *heap) in dma_heap_get_drvdata() argument
204 return heap->priv; in dma_heap_get_drvdata()
214 const char *dma_heap_get_name(struct dma_heap *heap) in dma_heap_get_name() argument
216 return heap->name; in dma_heap_get_name()
221 struct dma_heap *heap, *h, *err_ret; in dma_heap_add() local
236 heap = kzalloc(sizeof(*heap), GFP_KERNEL); in dma_heap_add()
237 if (!heap) in dma_heap_add()
240 heap->name = exp_info->name; in dma_heap_add()
241 heap->ops = exp_info->ops; in dma_heap_add()
242 heap->priv = exp_info->priv; in dma_heap_add()
245 ret = xa_alloc(&dma_heap_minors, &minor, heap, in dma_heap_add()
254 heap->heap_devt = MKDEV(MAJOR(dma_heap_devt), minor); in dma_heap_add()
256 cdev_init(&heap->heap_cdev, &dma_heap_fops); in dma_heap_add()
257 ret = cdev_add(&heap->heap_cdev, heap->heap_devt, 1); in dma_heap_add()
266 heap->heap_devt, in dma_heap_add()
268 heap->name); in dma_heap_add()
288 list_add(&heap->list, &heap_list); in dma_heap_add()
291 return heap; in dma_heap_add()
294 device_destroy(dma_heap_class, heap->heap_devt); in dma_heap_add()
296 cdev_del(&heap->heap_cdev); in dma_heap_add()
300 kfree(heap); in dma_heap_add()