Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88d4bda8 authored by Rebecca Schultz Zavin's avatar Rebecca Schultz Zavin Committed by Greg Kroah-Hartman
Browse files

gpu: ion: Only flush buffers in the chunk heap if they were used cached



Signed-off-by: default avatarRebecca Schultz Zavin <rebecca@android.com>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0b6b2cde
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ static void ion_chunk_heap_free(struct ion_buffer *buffer)
	ion_heap_buffer_zero(buffer);

	for_each_sg(table->sgl, sg, table->nents, i) {
		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)),