xref: /linux/include/linux/dma-buf-mapping.h (revision a3ebb59eee2e558e8f8f27fc3f75cd367f17cd8e)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * DMA BUF Mapping Helpers
4  *
5  */
6 #ifndef __DMA_BUF_MAPPING_H__
7 #define __DMA_BUF_MAPPING_H__
8 #include <linux/dma-buf.h>
9 
10 struct sg_table *dma_buf_phys_vec_to_sgt(struct dma_buf_attachment *attach,
11 					 struct p2pdma_provider *provider,
12 					 struct dma_buf_phys_vec *phys_vec,
13 					 size_t nr_ranges, size_t size,
14 					 enum dma_data_direction dir);
15 void dma_buf_free_sgt(struct dma_buf_attachment *attach, struct sg_table *sgt,
16 		      enum dma_data_direction dir);
17 #endif
18