Loading drivers/staging/android/ion/ion_carveout_heap.c +5 −3 Original line number Diff line number Diff line Loading @@ -96,11 +96,12 @@ static void ion_carveout_heap_free(struct ion_buffer *buffer) struct sg_table *table = buffer->sg_table; struct page *page = sg_page(table->sgl); phys_addr_t paddr = page_to_phys(page); struct device *dev = (struct device *)heap->priv; ion_heap_buffer_zero(buffer); if (ion_buffer_cached(buffer)) dma_sync_sg_for_device(NULL, table->sgl, table->nents, ion_pages_sync_for_device(dev, page, buffer->size, DMA_BIDIRECTIONAL); ion_carveout_free(heap, paddr, buffer->size); Loading @@ -123,11 +124,12 @@ struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap *heap_data) struct page *page; size_t size; struct device *dev = (struct device *)heap_data->priv; page = pfn_to_page(PFN_DOWN(heap_data->base)); size = heap_data->size; ion_pages_sync_for_device(NULL, page, size, DMA_BIDIRECTIONAL); ion_pages_sync_for_device(dev, page, size, DMA_BIDIRECTIONAL); ret = ion_heap_pages_zero(page, size, pgprot_writecombine(PAGE_KERNEL)); if (ret) Loading Loading
drivers/staging/android/ion/ion_carveout_heap.c +5 −3 Original line number Diff line number Diff line Loading @@ -96,11 +96,12 @@ static void ion_carveout_heap_free(struct ion_buffer *buffer) struct sg_table *table = buffer->sg_table; struct page *page = sg_page(table->sgl); phys_addr_t paddr = page_to_phys(page); struct device *dev = (struct device *)heap->priv; ion_heap_buffer_zero(buffer); if (ion_buffer_cached(buffer)) dma_sync_sg_for_device(NULL, table->sgl, table->nents, ion_pages_sync_for_device(dev, page, buffer->size, DMA_BIDIRECTIONAL); ion_carveout_free(heap, paddr, buffer->size); Loading @@ -123,11 +124,12 @@ struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap *heap_data) struct page *page; size_t size; struct device *dev = (struct device *)heap_data->priv; page = pfn_to_page(PFN_DOWN(heap_data->base)); size = heap_data->size; ion_pages_sync_for_device(NULL, page, size, DMA_BIDIRECTIONAL); ion_pages_sync_for_device(dev, page, size, DMA_BIDIRECTIONAL); ret = ion_heap_pages_zero(page, size, pgprot_writecombine(PAGE_KERNEL)); if (ret) Loading