ANDROID: ion: export some ion symbols
Background: We can allocate buffer from ion_system_heap for general case, if the buffer is needed to access by HW, we need to map/unmap dma_address by iommu driver before and after HW engine access for iommu case. For example, if the same buffer is accessed by three HW engines, then every device driver needs to map/unmap dma_address by iommu driver respectively. For MTK platform, all the multimedia HW engines use the same iommu HW and share the same iommu page table, so multiple map/unmap dma_address by iommu driver maybe reduce performance seriously for above case, especially for big size buffer. In order to improve performance for MTK platform, we want to add ion_mtk_iommu_heap and implement map/unmap dma_address by ion_mtk_iommu_heap: a.heap->buf_ops.map_dma_buf: If more than one attachments map dma_address by iommu driver about the same buffer, the function only map once in first attachment, the other attachments of buffer copy sg_table which has already mapped to respective sg_table directly and don't mapping dma_address truly. b.heap->buf_ops.unmap_dma_buf: Do nothing. c.heap->buf_ops.release: unmap dma_address by iommu driver about buffer and free the buffer. Based on above description: We will build ion_mtk_iommu_heap as a kernel module and ion_mtk_iommu_heap also use some APIs like ion_system_heap but they not do export symbol ion_page_pool_alloc() ion_page_pool_free() ion_page_pool_nr_pages() ion_page_pool_shrink() ion_page_pool_create() ion_page_pool_destroy() Bug: 158729041 Change-Id: If3897d5e0105edefe03a51ac52c7b3d423aaa988 Signed-off-by:Chao Hao <chao.hao@mediatek.com> Signed-off-by:
Chun-Hung Wu <chun-hung.wu@mediatek.com>
Loading
Please sign in to comment