diff options
author | Rebecca Schultz Zavin | 2013-01-14 17:29:10 -0600 |
---|---|---|
committer | Arve Hjønnevåg | 2013-04-29 16:43:20 -0500 |
commit | bde5e138876fb05e239d0de1e29cc553e83f1edd (patch) | |
tree | 314783af5e7fc01b149031297082d7cd047d7181 | |
parent | 31457df699968fd039323a80ce05a749b327fa21 (diff) | |
download | kernel-common-bde5e138876fb05e239d0de1e29cc553e83f1edd.tar.gz kernel-common-bde5e138876fb05e239d0de1e29cc553e83f1edd.tar.xz kernel-common-bde5e138876fb05e239d0de1e29cc553e83f1edd.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) | |||
104 | ion_heap_buffer_zero(buffer); | 104 | ion_heap_buffer_zero(buffer); |
105 | 105 | ||
106 | for_each_sg(table->sgl, sg, table->nents, i) { | 106 | for_each_sg(table->sgl, sg, table->nents, i) { |
107 | __dma_page_cpu_to_dev(sg_page(sg), 0, sg_dma_len(sg), | 107 | if (ion_buffer_cached(buffer)) |
108 | DMA_BIDIRECTIONAL); | 108 | __dma_page_cpu_to_dev(sg_page(sg), 0, sg_dma_len(sg), |
109 | DMA_BIDIRECTIONAL); | ||
109 | gen_pool_free(chunk_heap->pool, page_to_phys(sg_page(sg)), | 110 | gen_pool_free(chunk_heap->pool, page_to_phys(sg_page(sg)), |
110 | sg_dma_len(sg)); | 111 | sg_dma_len(sg)); |
111 | } | 112 | } |