diff options
author | Rebecca Schultz Zavin <rebecca@android.com> | 2013-12-13 14:24:32 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-14 08:55:41 -0800 |
commit | 0b6b2cde0928707a618ce8c07970219f21d066e5 (patch) | |
tree | 3e5a30a51da5f59b5308bace190b56b2fbc5caca /drivers/staging/android/ion/ion_chunk_heap.c | |
parent | 77cbe828a10026f8ff208eaa67d75675a3ffbdfc (diff) |
gpu: ion: Refactor the code to zero buffers
Refactor the code in the system heap used to map and zero the buffers
into a seperate utility so it can be called from other heaps. Use it from
the chunk heap.
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_chunk_heap.c')
-rw-r--r-- | drivers/staging/android/ion/ion_chunk_heap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/android/ion/ion_chunk_heap.c b/drivers/staging/android/ion/ion_chunk_heap.c index 1d4740987267..558290989fe6 100644 --- a/drivers/staging/android/ion/ion_chunk_heap.c +++ b/drivers/staging/android/ion/ion_chunk_heap.c @@ -101,6 +101,8 @@ static void ion_chunk_heap_free(struct ion_buffer *buffer) struct scatterlist *sg; int i; + ion_heap_buffer_zero(buffer); + for_each_sg(table->sgl, sg, table->nents, i) { __dma_page_cpu_to_dev(sg_page(sg), 0, sg_dma_len(sg), DMA_BIDIRECTIONAL); |