diff options
| author | Arve Hjønnevåg <arve@android.com> | 2012-11-26 17:14:58 -0800 | 
|---|---|---|
| committer | Arve Hjønnevåg <arve@android.com> | 2013-07-01 15:51:51 -0700 | 
| commit | 3bb28260e465782c48ce5006c99b5641200e91a2 (patch) | |
| tree | 8c82636ecaa18943bf683113a25a01ded32afd5b /drivers/gpu/ion/ion_chunk_heap.c | |
| parent | 4b4559062472f7e81d0a6831538686d989226864 (diff) | |
| download | olio-linux-3.10-3bb28260e465782c48ce5006c99b5641200e91a2.tar.xz olio-linux-3.10-3bb28260e465782c48ce5006c99b5641200e91a2.zip | |
gpu: ion: __dma_page_cpu_to_dev -> arm_dma_ops.sync_single_for_device hack
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Diffstat (limited to 'drivers/gpu/ion/ion_chunk_heap.c')
| -rw-r--r-- | drivers/gpu/ion/ion_chunk_heap.c | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/drivers/gpu/ion/ion_chunk_heap.c b/drivers/gpu/ion/ion_chunk_heap.c index cc824f3a81d..d5e7379a6f4 100644 --- a/drivers/gpu/ion/ion_chunk_heap.c +++ b/drivers/gpu/ion/ion_chunk_heap.c @@ -105,8 +105,9 @@ static void ion_chunk_heap_free(struct ion_buffer *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); +			arm_dma_ops.sync_single_for_device(NULL, +				pfn_to_dma(NULL, page_to_pfn(sg_page(sg))), +				sg_dma_len(sg), DMA_BIDIRECTIONAL);  		gen_pool_free(chunk_heap->pool, page_to_phys(sg_page(sg)),  			      sg_dma_len(sg));  	} @@ -177,8 +178,9 @@ struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap *heap_data)  	}  	free_vm_area(vm_struct); -	__dma_page_cpu_to_dev(phys_to_page(heap_data->base), 0, heap_data->size, -			      DMA_BIDIRECTIONAL); +	arm_dma_ops.sync_single_for_device(NULL, +		pfn_to_dma(NULL, page_to_pfn(phys_to_page(heap_data->base))), +		heap_data->size, DMA_BIDIRECTIONAL);  	gen_pool_add(chunk_heap->pool, chunk_heap->base, heap_data->size, -1);  	chunk_heap->heap.ops = &chunk_heap_ops;  	chunk_heap->heap.type = ION_HEAP_TYPE_CHUNK; |