/linux/drivers/target/ |
H A D | target_core_rd.c | 63 static u32 rd_release_sgl_table(struct rd_dev *rd_dev, struct rd_dev_sg_table *sg_table, in rd_release_sgl_table() argument 71 sg = sg_table[i].sg_table; in rd_release_sgl_table() 72 sg_per_table = sg_table[i].rd_sg_count; in rd_release_sgl_table() 84 kfree(sg_table); in rd_release_sgl_table() 112 static int rd_allocate_sgl_table(struct rd_dev *rd_dev, struct rd_dev_sg_table *sg_table, in rd_allocate_sgl_table() argument 142 sg_chain(sg_table[i - 1].sg_table, in rd_allocate_sgl_table() 146 sg_table[i].sg_table = sg; in rd_allocate_sgl_table() 147 sg_table[i].rd_sg_count = sg_per_table; in rd_allocate_sgl_table() 148 sg_table[i].page_start_offset = page_offset; in rd_allocate_sgl_table() 149 sg_table[i++].page_end_offset = (page_offset + sg_per_table) in rd_allocate_sgl_table() [all …]
|
/linux/drivers/hwtracing/coresight/ |
H A D | coresight-tmc-etr.c | 113 struct tmc_sg_table *sg_table; member 242 tmc_sg_get_data_page_offset(struct tmc_sg_table *sg_table, dma_addr_t addr) in tmc_sg_get_data_page_offset() argument 244 return tmc_pages_get_offset(&sg_table->data_pages, addr); in tmc_sg_get_data_page_offset() 247 static inline void tmc_free_table_pages(struct tmc_sg_table *sg_table) in tmc_free_table_pages() argument 249 if (sg_table->table_vaddr) in tmc_free_table_pages() 250 vunmap(sg_table->table_vaddr); in tmc_free_table_pages() 251 tmc_pages_free(&sg_table->table_pages, sg_table->dev, DMA_TO_DEVICE); in tmc_free_table_pages() 254 static void tmc_free_data_pages(struct tmc_sg_table *sg_table) in tmc_free_data_pages() argument 256 if (sg_table->data_vaddr) in tmc_free_data_pages() 257 vunmap(sg_table->data_vaddr); in tmc_free_data_pages() [all …]
|
H A D | coresight-tmc.h | 322 void tmc_free_sg_table(struct tmc_sg_table *sg_table); 323 void tmc_sg_table_sync_table(struct tmc_sg_table *sg_table); 326 ssize_t tmc_sg_table_get_data(struct tmc_sg_table *sg_table, 329 tmc_sg_table_buf_size(struct tmc_sg_table *sg_table) in tmc_sg_table_buf_size() argument 331 return (unsigned long)sg_table->data_pages.nr_pages << PAGE_SHIFT; in tmc_sg_table_buf_size()
|
/linux/drivers/dma-buf/ |
H A D | dma-buf.c | 777 static void mangle_sg_table(struct sg_table *sg_table) in mangle_sg_table() argument 788 for_each_sgtable_sg(sg_table, sg, i) in mangle_sg_table() 793 static struct sg_table *__map_dma_buf(struct dma_buf_attachment *attach, in __map_dma_buf() 796 struct sg_table *sg_table; in __map_dma_buf() local 799 sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction); in __map_dma_buf() 800 if (IS_ERR_OR_NULL(sg_table)) in __map_dma_buf() 801 return sg_table; in __map_dma_buf() 808 attach->dmabuf->ops->unmap_dma_buf(attach, sg_table, in __map_dma_buf() 814 mangle_sg_table(sg_table); in __map_dma_buf() 815 return sg_table; in __map_dma_buf() [all …]
|
/linux/drivers/media/common/videobuf2/ |
H A D | videobuf2-dma-sg.c | 41 struct sg_table sg_table; member 47 struct sg_table *dma_sgt; 105 struct sg_table *sgt; in vb2_dma_sg_alloc() 122 buf->dma_sgt = &buf->sg_table; in vb2_dma_sg_alloc() 145 sgt = &buf->sg_table; in vb2_dma_sg_alloc() 182 struct sg_table *sgt = &buf->sg_table; in vb2_dma_sg_put() 204 struct sg_table *sgt = buf->dma_sgt; in vb2_dma_sg_prepare() 215 struct sg_table *sgt = buf->dma_sgt; in vb2_dma_sg_finish() 227 struct sg_table *sgt; in vb2_dma_sg_get_userptr() 242 buf->dma_sgt = &buf->sg_table; in vb2_dma_sg_get_userptr() [all …]
|
H A D | videobuf2-dma-contig.c | 34 struct sg_table *dma_sgt; 40 struct sg_table *sgt_base; 53 static unsigned long vb2_dc_get_contiguous_size(struct sg_table *sgt) in vb2_dc_get_contiguous_size() 126 struct sg_table *sgt = buf->dma_sgt; in vb2_dc_prepare() 146 struct sg_table *sgt = buf->dma_sgt; in vb2_dc_finish() 313 struct sg_table sgt; 323 struct sg_table *sgt; in vb2_dc_dmabuf_ops_attach() 359 struct sg_table *sgt; in vb2_dc_dmabuf_ops_detach() 381 static struct sg_table *vb2_dc_dmabuf_ops_map( in vb2_dc_dmabuf_ops_map() 385 struct sg_table *sgt; in vb2_dc_dmabuf_ops_map() [all …]
|
/linux/include/drm/ |
H A D | drm_prime.h | 84 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, 87 struct sg_table *sgt, 95 struct sg_table *drm_prime_pages_to_sg(struct drm_device *dev, 100 unsigned long drm_prime_get_contiguous_size(struct sg_table *sgt); 109 void drm_prime_gem_destroy(struct drm_gem_object *obj, struct sg_table *sg); 111 int drm_prime_sg_to_page_array(struct sg_table *sgt, struct page **pages, 113 int drm_prime_sg_to_dma_addr_array(struct sg_table *sgt, dma_addr_t *addrs,
|
H A D | drm_gem_dma_helper.h | 24 struct sg_table *sgt; 40 struct sg_table *drm_gem_dma_get_sg_table(struct drm_gem_dma_object *dma_obj); 92 static inline struct sg_table *drm_gem_dma_object_get_sg_table(struct drm_gem_object *obj) in drm_gem_dma_object_get_sg_table() 153 struct sg_table *sgt); 228 struct sg_table *sgt);
|
/linux/drivers/gpu/drm/renesas/rcar-du/ |
H A D | rcar_du_vsp.h | 18 struct sg_table; 49 struct sg_table sg_tables[3]; 66 struct sg_table sg_tables[3]); 68 struct sg_table sg_tables[3]); 82 struct sg_table sg_tables[3]) in rcar_du_vsp_map_fb() 88 struct sg_table sg_tables[3]) in rcar_du_vsp_unmap_fb()
|
/linux/include/linux/ |
H A D | dma-buf.h | 179 struct sg_table * (*map_dma_buf)(struct dma_buf_attachment *, 190 struct sg_table *, 517 struct sg_table *sgt; 617 struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *, 619 void dma_buf_unmap_attachment(struct dma_buf_attachment *, struct sg_table *, 626 struct sg_table * 630 struct sg_table *sg_table,
|
H A D | intel_th.h | 43 int (*alloc_window)(void *priv, struct sg_table **sgt, 45 void (*free_window)(void *priv, struct sg_table *sgt); 59 int (*ready)(void *priv, struct sg_table *sgt, size_t bytes); 65 void intel_th_msc_window_unlock(struct device *dev, struct sg_table *sgt);
|
H A D | scatterlist.h | 39 struct sg_table { struct 46 struct sg_table sgt; /* The scatter list table */ argument 434 void __sg_free_table(struct sg_table *, unsigned int, unsigned int, 436 void sg_free_table(struct sg_table *); 438 int __sg_alloc_table(struct sg_table *, unsigned int, unsigned int, 440 int sg_alloc_table(struct sg_table *, unsigned int, gfp_t); 446 int sg_alloc_table_from_pages_segment(struct sg_table *sgt, struct page **pages, 471 static inline int sg_alloc_table_from_pages(struct sg_table *sgt, in sg_alloc_table_from_pages() 533 void sg_free_table_chained(struct sg_table *table, 535 int sg_alloc_table_chained(struct sg_table *table, int nents,
|
H A D | iommu-dma.h | 38 int iommu_dma_get_sgtable(struct device *dev, struct sg_table *sgt, 50 struct sg_table *iommu_dma_alloc_noncontiguous(struct device *dev, size_t size, 53 struct sg_table *sgt, enum dma_data_direction dir); 55 struct sg_table *sgt); 59 size_t size, struct sg_table *sgt);
|
H A D | dma-mapping.h | 110 int dma_map_sgtable(struct device *dev, struct sg_table *sgt, 124 int dma_get_sgtable_attrs(struct device *dev, struct sg_table *sgt, 139 struct sg_table *dma_alloc_noncontiguous(struct device *dev, size_t size, 142 struct sg_table *sgt, enum dma_data_direction dir); 144 struct sg_table *sgt); 147 size_t size, struct sg_table *sgt); 170 static inline int dma_map_sgtable(struct device *dev, struct sg_table *sgt, in dma_map_sgtable() 208 struct sg_table *sgt, void *cpu_addr, dma_addr_t dma_addr, in dma_get_sgtable_attrs() 255 static inline struct sg_table *dma_alloc_noncontiguous(struct device *dev, in dma_alloc_noncontiguous() 262 struct sg_table *sgt, enum dma_data_direction dir) in dma_free_noncontiguous() [all …]
|
/linux/drivers/spi/ |
H A D | internals.h | 24 struct sg_table *sgt, void *buf, size_t len, 27 struct sg_table *sgt, enum dma_data_direction dir); 30 struct sg_table *sgt, void *buf, size_t len, in spi_map_buf() 37 struct device *dev, struct sg_table *sgt, in spi_unmap_buf()
|
/linux/drivers/gpu/drm/xen/ |
H A D | xen_drm_front_gem.h | 18 struct sg_table; 26 struct sg_table *sgt); 28 struct sg_table *xen_drm_front_gem_get_sg_table(struct drm_gem_object *gem_obj);
|
/linux/drivers/hwtracing/intel_th/ |
H A D | msu-sink.c | 18 struct sg_table **sgts; 51 static int msu_sink_alloc_window(void *data, struct sg_table **sgt, size_t size) in msu_sink_alloc_window() 84 static void msu_sink_free_window(void *data, struct sg_table *sgt) in msu_sink_free_window() 99 static int msu_sink_ready(void *data, struct sg_table *sgt, size_t bytes) in msu_sink_ready()
|
/linux/include/linux/iio/ |
H A D | buffer-dma.h | 22 struct sg_table; 78 struct sg_table *sg_table; member 173 struct sg_table *sgt,
|
/linux/drivers/gpu/drm/mediatek/ |
H A D | mtk_gem.h | 31 struct sg_table *sg; 42 struct sg_table *mtk_gem_prime_get_sg_table(struct drm_gem_object *obj); 44 struct dma_buf_attachment *attach, struct sg_table *sg);
|
/linux/drivers/gpu/drm/i915/gt/ |
H A D | intel_ggtt_fencing.h | 18 struct sg_table; 50 struct sg_table *pages); 52 struct sg_table *pages);
|
/linux/drivers/gpu/drm/rockchip/ |
H A D | rockchip_drm_gem.h | 25 struct sg_table *sgt; 29 struct sg_table *rockchip_gem_prime_get_sg_table(struct drm_gem_object *obj); 33 struct sg_table *sg);
|
/linux/drivers/gpu/drm/omapdrm/ |
H A D | omap_gem_dmabuf.c | 20 static struct sg_table *omap_gem_map_dma_buf( in omap_gem_map_dma_buf() 25 struct sg_table *sg; in omap_gem_map_dma_buf() 34 struct sg_table *sg, enum dma_data_direction dir) in omap_gem_unmap_dma_buf() 102 struct sg_table *sgt; in omap_gem_prime_import()
|
/linux/drivers/gpu/drm/exynos/ |
H A D | exynos_drm_gem.h | 46 struct sg_table *sgt; 102 struct sg_table *exynos_drm_gem_prime_get_sg_table(struct drm_gem_object *obj); 106 struct sg_table *sgt);
|
/linux/drivers/gpu/drm/ |
H A D | drm_prime.c | 651 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, in drm_gem_map_dma_buf() 655 struct sg_table *sgt; in drm_gem_map_dma_buf() 689 struct sg_table *sgt, in drm_gem_unmap_dma_buf() 836 struct sg_table *drm_prime_pages_to_sg(struct drm_device *dev, in drm_prime_pages_to_sg() 839 struct sg_table *sg; in drm_prime_pages_to_sg() 843 sg = kmalloc(sizeof(struct sg_table), GFP_KERNEL); in drm_prime_pages_to_sg() 872 unsigned long drm_prime_get_contiguous_size(struct sg_table *sgt) in drm_prime_get_contiguous_size() 939 struct sg_table *sgt; in drm_gem_prime_import_dev() 1023 int __deprecated drm_prime_sg_to_page_array(struct sg_table *sgt, in drm_prime_sg_to_page_array() 1050 int drm_prime_sg_to_dma_addr_array(struct sg_table *sgt, dma_addr_t *addrs, in drm_prime_sg_to_dma_addr_array() [all …]
|
/linux/include/media/ |
H A D | videobuf2-dma-sg.h | 18 static inline struct sg_table *vb2_dma_sg_plane_desc( in vb2_dma_sg_plane_desc() 21 return (struct sg_table *)vb2_plane_cookie(vb, plane_no); in vb2_dma_sg_plane_desc()
|