diff options
author | Rebecca Schultz Zavin <rebecca@android.com> | 2013-12-13 14:24:27 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-14 08:55:40 -0800 |
commit | e3c2eb7cd9f291bf17ee056e388d0089cf378345 (patch) | |
tree | 315341c3775e2c386970949693c30e11d5413b15 /drivers/staging/android/ion/ion_heap.c | |
parent | 8898227ed555b477e2989a2a9b984fa37e7a9b42 (diff) |
gpu: ion: Add chunk heap
This patch adds support for a chunk heap that allows for buffers that are
made up of a list of fixed size chunks taken from a carveout. Chunk sizes
are configured when the heaps are created by passing the chunk size in the
priv field of the heap platform data.
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/ion/ion_heap.c')
-rw-r--r-- | drivers/staging/android/ion/ion_heap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/android/ion/ion_heap.c b/drivers/staging/android/ion/ion_heap.c index 441e9ef0b69c..a9bf52e4d6f1 100644 --- a/drivers/staging/android/ion/ion_heap.c +++ b/drivers/staging/android/ion/ion_heap.c @@ -107,6 +107,9 @@ struct ion_heap *ion_heap_create(struct ion_platform_heap *heap_data) case ION_HEAP_TYPE_CARVEOUT: heap = ion_carveout_heap_create(heap_data); break; + case ION_HEAP_TYPE_CHUNK: + heap = ion_chunk_heap_create(heap_data); + break; default: pr_err("%s: Invalid heap type %d\n", __func__, heap_data->type); @@ -140,6 +143,9 @@ void ion_heap_destroy(struct ion_heap *heap) case ION_HEAP_TYPE_CARVEOUT: ion_carveout_heap_destroy(heap); break; + case ION_HEAP_TYPE_CHUNK: + ion_chunk_heap_destroy(heap); + break; default: pr_err("%s: Invalid heap type %d\n", __func__, heap->type); |