• Home
  • Raw
  • Download

Lines Matching refs:sg_table

729 static void mangle_sg_table(struct sg_table *sg_table)  in mangle_sg_table()  argument
739 for_each_sgtable_sg(sg_table, sg, i) in mangle_sg_table()
744 static struct sg_table * __map_dma_buf(struct dma_buf_attachment *attach, in __map_dma_buf()
747 struct sg_table *sg_table; in __map_dma_buf() local
749 sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction); in __map_dma_buf()
751 if (!IS_ERR_OR_NULL(sg_table)) in __map_dma_buf()
752 mangle_sg_table(sg_table); in __map_dma_buf()
754 return sg_table; in __map_dma_buf()
819 struct sg_table *sgt; in dma_buf_dynamic_attach()
876 struct sg_table *sg_table, in __unmap_dma_buf() argument
880 mangle_sg_table(sg_table); in __unmap_dma_buf()
882 attach->dmabuf->ops->unmap_dma_buf(attach, sg_table, direction); in __unmap_dma_buf()
993 struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach, in dma_buf_map_attachment()
996 struct sg_table *sg_table; in dma_buf_map_attachment() local
1028 sg_table = __map_dma_buf(attach, direction); in dma_buf_map_attachment()
1029 if (!sg_table) in dma_buf_map_attachment()
1030 sg_table = ERR_PTR(-ENOMEM); in dma_buf_map_attachment()
1032 if (IS_ERR(sg_table) && dma_buf_is_dynamic(attach->dmabuf) && in dma_buf_map_attachment()
1036 if (!IS_ERR(sg_table) && attach->dmabuf->ops->cache_sgt_mapping) { in dma_buf_map_attachment()
1037 attach->sgt = sg_table; in dma_buf_map_attachment()
1042 if (!IS_ERR(sg_table)) { in dma_buf_map_attachment()
1048 for_each_sgtable_dma_sg(sg_table, sg, i) { in dma_buf_map_attachment()
1058 return sg_table; in dma_buf_map_attachment()
1073 struct sg_table *sg_table, in dma_buf_unmap_attachment() argument
1078 if (WARN_ON(!attach || !attach->dmabuf || !sg_table)) in dma_buf_unmap_attachment()
1084 if (attach->sgt == sg_table) in dma_buf_unmap_attachment()
1090 __unmap_dma_buf(attach, sg_table, direction); in dma_buf_unmap_attachment()