aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
Diffstat (limited to 'include/media')
-rw-r--r--include/media/videobuf-dma-sg.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/include/media/videobuf-dma-sg.h b/include/media/videobuf-dma-sg.h
index a195f3b9c00a..80130100e450 100644
--- a/include/media/videobuf-dma-sg.h
+++ b/include/media/videobuf-dma-sg.h
@@ -87,6 +87,16 @@ struct videobuf_dma_sg_memory {
87 struct videobuf_dmabuf dma; 87 struct videobuf_dmabuf dma;
88}; 88};
89 89
90/*
91 * Scatter-gather DMA buffer API.
92 *
93 * These functions provide a simple way to create a page list and a
94 * scatter-gather list from a kernel, userspace of physical address and map the
95 * memory for DMA operation.
96 *
97 * Despite the name, this is totally unrelated to videobuf, except that
98 * videobuf-dma-sg uses the same API internally.
99 */
90void videobuf_dma_init(struct videobuf_dmabuf *dma); 100void videobuf_dma_init(struct videobuf_dmabuf *dma);
91int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction, 101int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction,
92 unsigned long data, unsigned long size); 102 unsigned long data, unsigned long size);
@@ -96,8 +106,8 @@ int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction,
96 dma_addr_t addr, int nr_pages); 106 dma_addr_t addr, int nr_pages);
97int videobuf_dma_free(struct videobuf_dmabuf *dma); 107int videobuf_dma_free(struct videobuf_dmabuf *dma);
98 108
99int videobuf_dma_map(struct videobuf_queue *q, struct videobuf_dmabuf *dma); 109int videobuf_dma_map(struct device *dev, struct videobuf_dmabuf *dma);
100int videobuf_dma_unmap(struct videobuf_queue *q, struct videobuf_dmabuf *dma); 110int videobuf_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma);
101struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf); 111struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf);
102 112
103void *videobuf_sg_alloc(size_t size); 113void *videobuf_sg_alloc(size_t size);
@@ -111,11 +121,5 @@ void videobuf_queue_sg_init(struct videobuf_queue *q,
111 unsigned int msize, 121 unsigned int msize,
112 void *priv); 122 void *priv);
113 123
114/*FIXME: these variants are used only on *-alsa code, where videobuf is
115 * used without queue
116 */
117int videobuf_sg_dma_map(struct device *dev, struct videobuf_dmabuf *dma);
118int videobuf_sg_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma);
119
120#endif /* _VIDEOBUF_DMA_SG_H */ 124#endif /* _VIDEOBUF_DMA_SG_H */
121 125