summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Einar Reitan <john.reitan@arm.com>2015-11-18 14:53:54 +0100
committerJohn Einar Reitan <john.reitan@arm.com>2016-01-15 11:04:42 +0100
commitcbf003119fa4785dea78c708e1b2bde2823491e7 (patch)
treefd94cfa4c78b3ac49f54192da17b1ce8ba92e61c
parent2b8cff766e6857b26603dfecd3b562ac1c8b60f5 (diff)
ion: Expose compound page heap
This exposes the new compound page heap in the ion core, but device-specific inclusion of the heap must be done in the platform heaps definition. Change-Id: Ib6ca7bf73b40766ce2e787396722116ff1dc78b1 Signed-off-by: John Einar Reitan <john.reitan@arm.com>
-rw-r--r--drivers/staging/android/ion/ion_heap.c6
-rw-r--r--drivers/staging/android/ion/ion_priv.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/android/ion/ion_heap.c b/drivers/staging/android/ion/ion_heap.c
index 01abaf9c67e..50dab4af6b7 100644
--- a/drivers/staging/android/ion/ion_heap.c
+++ b/drivers/staging/android/ion/ion_heap.c
@@ -322,6 +322,9 @@ struct ion_heap *ion_heap_create(struct ion_platform_heap *heap_data)
case ION_HEAP_TYPE_DMA:
heap = ion_cma_heap_create(heap_data);
break;
+ case ION_HEAP_TYPE_COMPOUND_PAGE:
+ heap = ion_compound_page_pool_create(heap_data);
+ break;
default:
pr_err("%s: Invalid heap type %d\n", __func__,
heap_data->type);
@@ -361,6 +364,9 @@ void ion_heap_destroy(struct ion_heap *heap)
case ION_HEAP_TYPE_DMA:
ion_cma_heap_destroy(heap);
break;
+ case ION_HEAP_TYPE_COMPOUND_PAGE:
+ ion_compound_page_pool_destroy(heap);
+ break;
default:
pr_err("%s: Invalid heap type %d\n", __func__,
heap->type);
diff --git a/drivers/staging/android/ion/ion_priv.h b/drivers/staging/android/ion/ion_priv.h
index 9bcd077f251..2c2d1f61862 100644
--- a/drivers/staging/android/ion/ion_priv.h
+++ b/drivers/staging/android/ion/ion_priv.h
@@ -326,6 +326,9 @@ struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap *);
void ion_chunk_heap_destroy(struct ion_heap *);
struct ion_heap *ion_cma_heap_create(struct ion_platform_heap *);
void ion_cma_heap_destroy(struct ion_heap *);
+struct ion_heap *ion_compound_page_pool_create(struct ion_platform_heap *);
+void ion_compound_page_pool_destroy(struct ion_heap *);
+
/**
* kernel api to allocate/free from carveout -- used when carveout is