diff options
| author | Rebecca Schultz Zavin <rebecca@android.com> | 2013-01-14 15:29:10 -0800 | 
|---|---|---|
| committer | Arve Hjønnevåg <arve@android.com> | 2013-07-01 14:16:20 -0700 | 
| commit | aa74ef088598dd9b78d6731caa21c6f0c0c58fae (patch) | |
| tree | 8ee8ad9ac2f8a12a5afa0a654ca1dc12fd960722 | |
| parent | d5c90f9fa558245c8ab5719ae9e2bb201d53c370 (diff) | |
| download | olio-linux-3.10-aa74ef088598dd9b78d6731caa21c6f0c0c58fae.tar.xz olio-linux-3.10-aa74ef088598dd9b78d6731caa21c6f0c0c58fae.zip | |
gpu: ion: Only flush buffers in the chunk heap if they were used cached
Change-Id: I4ffcf81a6be09e968310bbd882fb017415d61b48
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
| -rw-r--r-- | drivers/gpu/ion/ion_chunk_heap.c | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/drivers/gpu/ion/ion_chunk_heap.c b/drivers/gpu/ion/ion_chunk_heap.c index f65274d3306..687af63b9f5 100644 --- a/drivers/gpu/ion/ion_chunk_heap.c +++ b/drivers/gpu/ion/ion_chunk_heap.c @@ -104,8 +104,9 @@ static void ion_chunk_heap_free(struct ion_buffer *buffer)  	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); +		if (ion_buffer_cached(buffer)) +			__dma_page_cpu_to_dev(sg_page(sg), 0, sg_dma_len(sg), +					      DMA_BIDIRECTIONAL);  		gen_pool_free(chunk_heap->pool, page_to_phys(sg_page(sg)),  			      sg_dma_len(sg));  	} |