From d5c90f9fa558245c8ab5719ae9e2bb201d53c370 Mon Sep 17 00:00:00 2001 From: Rebecca Schultz Zavin Date: Wed, 9 Jan 2013 11:26:37 -0800 Subject: 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. Change-Id: I706341ae42b80bc4aae8a8614b4f73435bbf05d9 Signed-off-by: Rebecca Schultz Zavin --- drivers/gpu/ion/ion_chunk_heap.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/ion/ion_chunk_heap.c') diff --git a/drivers/gpu/ion/ion_chunk_heap.c b/drivers/gpu/ion/ion_chunk_heap.c index 01381827f58..f65274d3306 100644 --- a/drivers/gpu/ion/ion_chunk_heap.c +++ b/drivers/gpu/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); -- cgit v1.2.3-70-g09d2