Home
last modified time | relevance | path

Searched refs:heap (Results 1 – 14 of 14) sorted by relevance

/drivers/gpu/ion/
Dion_heap.c28 void *ion_heap_map_kernel(struct ion_heap *heap, in ion_heap_map_kernel() argument
65 void ion_heap_unmap_kernel(struct ion_heap *heap, in ion_heap_unmap_kernel() argument
71 int ion_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer, in ion_heap_map_user() argument
167 void ion_heap_freelist_add(struct ion_heap *heap, struct ion_buffer * buffer) in ion_heap_freelist_add() argument
169 rt_mutex_lock(&heap->lock); in ion_heap_freelist_add()
170 list_add(&buffer->list, &heap->free_list); in ion_heap_freelist_add()
171 heap->free_list_size += buffer->size; in ion_heap_freelist_add()
172 rt_mutex_unlock(&heap->lock); in ion_heap_freelist_add()
173 wake_up(&heap->waitqueue); in ion_heap_freelist_add()
176 size_t ion_heap_freelist_size(struct ion_heap *heap) in ion_heap_freelist_size() argument
[all …]
Dion_system_heap.c52 struct ion_heap heap; member
62 static struct page *alloc_buffer_page(struct ion_system_heap *heap, in alloc_buffer_page() argument
67 struct ion_page_pool *pool = heap->pools[order_to_index(order)]; in alloc_buffer_page()
89 static void free_buffer_page(struct ion_system_heap *heap, in free_buffer_page() argument
98 struct ion_page_pool *pool = heap->pools[order_to_index(order)]; in free_buffer_page()
109 static struct page_info *alloc_largest_available(struct ion_system_heap *heap, in alloc_largest_available() argument
124 page = alloc_buffer_page(heap, buffer, orders[i]); in alloc_largest_available()
136 static int ion_system_heap_allocate(struct ion_heap *heap, in ion_system_heap_allocate() argument
141 struct ion_system_heap *sys_heap = container_of(heap, in ion_system_heap_allocate()
143 heap); in ion_system_heap_allocate()
[all …]
Dion_carveout_heap.c31 struct ion_heap heap; member
36 ion_phys_addr_t ion_carveout_allocate(struct ion_heap *heap, in ion_carveout_allocate() argument
41 container_of(heap, struct ion_carveout_heap, heap); in ion_carveout_allocate()
50 void ion_carveout_free(struct ion_heap *heap, ion_phys_addr_t addr, in ion_carveout_free() argument
54 container_of(heap, struct ion_carveout_heap, heap); in ion_carveout_free()
61 static int ion_carveout_heap_phys(struct ion_heap *heap, in ion_carveout_heap_phys() argument
70 static int ion_carveout_heap_allocate(struct ion_heap *heap, in ion_carveout_heap_allocate() argument
75 buffer->priv_phys = ion_carveout_allocate(heap, size, align); in ion_carveout_heap_allocate()
81 struct ion_heap *heap = buffer->heap; in ion_carveout_heap_free() local
83 ion_carveout_free(heap, buffer->priv_phys, buffer->size); in ion_carveout_heap_free()
[all …]
Dion_cma_heap.c31 struct ion_heap heap; member
35 #define to_cma_heap(x) container_of(x, struct ion_cma_heap, heap)
63 static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer, in ion_cma_allocate() argument
67 struct ion_cma_heap *cma_heap = to_cma_heap(heap); in ion_cma_allocate()
111 struct ion_cma_heap *cma_heap = to_cma_heap(buffer->heap); in ion_cma_free()
125 static int ion_cma_phys(struct ion_heap *heap, struct ion_buffer *buffer, in ion_cma_phys() argument
128 struct ion_cma_heap *cma_heap = to_cma_heap(buffer->heap); in ion_cma_phys()
141 struct sg_table *ion_cma_heap_map_dma(struct ion_heap *heap, in ion_cma_heap_map_dma() argument
149 void ion_cma_heap_unmap_dma(struct ion_heap *heap, in ion_cma_heap_unmap_dma() argument
158 struct ion_cma_heap *cma_heap = to_cma_heap(buffer->heap); in ion_cma_mmap()
[all …]
Dion_priv.h64 struct ion_heap *heap; member
101 int (*allocate) (struct ion_heap *heap,
105 int (*phys) (struct ion_heap *heap, struct ion_buffer *buffer,
107 struct sg_table *(*map_dma) (struct ion_heap *heap,
109 void (*unmap_dma) (struct ion_heap *heap, struct ion_buffer *buffer);
110 void * (*map_kernel) (struct ion_heap *heap, struct ion_buffer *buffer);
111 void (*unmap_kernel) (struct ion_heap *heap, struct ion_buffer *buffer);
163 int (*debug_show)(struct ion_heap *heap, struct seq_file *, void *);
205 void ion_device_add_heap(struct ion_device *dev, struct ion_heap *heap);
238 int ion_heap_init_deferred_free(struct ion_heap *heap);
[all …]
Dion.c168 static struct ion_buffer *ion_buffer_create(struct ion_heap *heap, in ion_buffer_create() argument
183 buffer->heap = heap; in ion_buffer_create()
187 ret = heap->ops->allocate(heap, buffer, len, align, flags); in ion_buffer_create()
190 if (!(heap->flags & ION_HEAP_FLAG_DEFER_FREE)) in ion_buffer_create()
193 ion_heap_freelist_drain(heap, 0); in ion_buffer_create()
194 ret = heap->ops->allocate(heap, buffer, len, align, in ion_buffer_create()
203 table = heap->ops->map_dma(heap, buffer); in ion_buffer_create()
207 heap->ops->free(buffer); in ion_buffer_create()
254 heap->ops->unmap_dma(heap, buffer); in ion_buffer_create()
255 heap->ops->free(buffer); in ion_buffer_create()
[all …]
Dion_chunk_heap.c31 struct ion_heap heap; member
39 static int ion_chunk_heap_allocate(struct ion_heap *heap, in ion_chunk_heap_allocate() argument
45 container_of(heap, struct ion_chunk_heap, heap); in ion_chunk_heap_allocate()
97 struct ion_heap *heap = buffer->heap; in ion_chunk_heap_free() local
99 container_of(heap, struct ion_chunk_heap, heap); in ion_chunk_heap_free()
121 struct sg_table *ion_chunk_heap_map_dma(struct ion_heap *heap, in ion_chunk_heap_map_dma() argument
127 void ion_chunk_heap_unmap_dma(struct ion_heap *heap, in ion_chunk_heap_unmap_dma() argument
186 chunk_heap->heap.ops = &chunk_heap_ops; in ion_chunk_heap_create()
187 chunk_heap->heap.type = ION_HEAP_TYPE_CHUNK; in ion_chunk_heap_create()
188 chunk_heap->heap.flags = ION_HEAP_FLAG_DEFER_FREE; in ion_chunk_heap_create()
[all …]
Dion_system_mapper.c33 if (!((1 << buffer->heap->type) & mapper->heap_mask)) { in ion_kernel_mapper_map()
46 if (!((1 << buffer->heap->type) & mapper->heap_mask)) in ion_kernel_mapper_unmap()
55 if (!((1 << buffer->heap->type) & mapper->heap_mask)) { in ion_kernel_mapper_map_kernel()
70 switch (buffer->heap->type) { in ion_kernel_mapper_map_user()
/drivers/gpu/drm/radeon/
Dradeon_mem.c83 static struct mem_block *alloc_block(struct mem_block *heap, int size, in alloc_block() argument
89 list_for_each(p, heap) { in alloc_block()
98 static struct mem_block *find_block(struct mem_block *heap, int start) in find_block() argument
102 list_for_each(p, heap) in find_block()
135 static int init_heap(struct mem_block **heap, int start, int size) in init_heap() argument
142 *heap = kzalloc(sizeof(**heap), GFP_KERNEL); in init_heap()
143 if (!*heap) { in init_heap()
151 blocks->next = blocks->prev = *heap; in init_heap()
153 (*heap)->file_priv = (struct drm_file *) - 1; in init_heap()
154 (*heap)->next = (*heap)->prev = blocks; in init_heap()
[all …]
Dradeon_drv.h385 extern void radeon_mem_takedown(struct mem_block **heap);
387 struct mem_block *heap);
/drivers/gpu/drm/nouveau/
Dnouveau_mm.c157 struct nouveau_mm_node *node, *heap = in nouveau_mm_fini() local
173 kfree(heap); in nouveau_mm_fini()
Dnouveau_fence.c283 ret = drm_mm_pre_get(&dev_priv->fence.heap); in semaphore_alloc()
288 sema->mem = drm_mm_search_free(&dev_priv->fence.heap, size, 0, 0); in semaphore_alloc()
588 ret = drm_mm_init(&dev_priv->fence.heap, 0, in nouveau_fence_init()
609 drm_mm_takedown(&dev_priv->fence.heap); in nouveau_fence_fini()
Dnouveau_drv.h747 struct drm_mm heap; member
/drivers/staging/tidspbridge/
DKconfig52 This can lead to heap corruption. Say Y, to enforce the check for 128