summaryrefslogtreecommitdiff
path: root/drivers/gpu/ion/ion_system_heap.c
diff options
context:
space:
mode:
authorRebecca Schultz Zavin <rebecca@android.com>2013-02-13 14:48:11 -0800
committerArve Hjønnevåg <arve@android.com>2013-07-01 14:16:22 -0700
commit7533724d29d13cde4f8b839ec066c5941a6674c8 (patch)
treef4e4fd4ab3a1bf0b014ff10e83f3d3d803f2d7c0 /drivers/gpu/ion/ion_system_heap.c
parent0c5363f6a0a89952b0d0072ff4e4c3bd042add9a (diff)
downloadolio-linux-3.10-7533724d29d13cde4f8b839ec066c5941a6674c8.tar.xz
olio-linux-3.10-7533724d29d13cde4f8b839ec066c5941a6674c8.zip
gpu: ion: Make ion_free asynchronous
Add the ability for a heap to free buffers asynchrounously. Freed buffers are placed on a free list and freed from a low priority background thread. If allocations from a particular heap fail, the free list is drained. This patch also enable asynchronous frees from the chunk heap. Change-Id: Idfdbc8608b6cbd9e27d2e31ea4fd84fea9f69f7d Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Diffstat (limited to 'drivers/gpu/ion/ion_system_heap.c')
-rw-r--r--drivers/gpu/ion/ion_system_heap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/ion/ion_system_heap.c b/drivers/gpu/ion/ion_system_heap.c
index c1061a801a4..6369fe8f305 100644
--- a/drivers/gpu/ion/ion_system_heap.c
+++ b/drivers/gpu/ion/ion_system_heap.c
@@ -283,6 +283,7 @@ struct ion_heap *ion_system_heap_create(struct ion_platform_heap *unused)
return ERR_PTR(-ENOMEM);
heap->heap.ops = &system_heap_ops;
heap->heap.type = ION_HEAP_TYPE_SYSTEM;
+ heap->heap.flags = ION_HEAP_FLAG_DEFER_FREE;
heap->pools = kzalloc(sizeof(struct ion_page_pool *) * num_orders,
GFP_KERNEL);
if (!heap->pools)