diff options
Diffstat (limited to 'Documentation/video4linux')
-rw-r--r-- | Documentation/video4linux/v4l2-framework.txt | 1 | ||||
-rw-r--r-- | Documentation/video4linux/videobuf | 44 |
2 files changed, 22 insertions, 23 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index 90b0a08ea476..5155700c206b 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -609,4 +609,3 @@ scatter/gather method (videobuf-dma-sg), DMA with linear access | |||
609 | 609 | ||
610 | Please see Documentation/video4linux/videobuf for more information on how | 610 | Please see Documentation/video4linux/videobuf for more information on how |
611 | to use the videobuf layer. | 611 | to use the videobuf layer. |
612 | |||
diff --git a/Documentation/video4linux/videobuf b/Documentation/video4linux/videobuf index ba4ca991c550..17a1f9abf260 100644 --- a/Documentation/video4linux/videobuf +++ b/Documentation/video4linux/videobuf | |||
@@ -112,7 +112,7 @@ then pass it to the appropriate free routine(s): | |||
112 | 112 | ||
113 | /* Scatter/gather drivers */ | 113 | /* Scatter/gather drivers */ |
114 | int videobuf_dma_unmap(struct videobuf_queue *q, | 114 | int videobuf_dma_unmap(struct videobuf_queue *q, |
115 | struct videobuf_dmabuf *dma); | 115 | struct videobuf_dmabuf *dma); |
116 | int videobuf_dma_free(struct videobuf_dmabuf *dma); | 116 | int videobuf_dma_free(struct videobuf_dmabuf *dma); |
117 | 117 | ||
118 | /* vmalloc drivers */ | 118 | /* vmalloc drivers */ |
@@ -120,7 +120,7 @@ then pass it to the appropriate free routine(s): | |||
120 | 120 | ||
121 | /* Contiguous drivers */ | 121 | /* Contiguous drivers */ |
122 | void videobuf_dma_contig_free(struct videobuf_queue *q, | 122 | void videobuf_dma_contig_free(struct videobuf_queue *q, |
123 | struct videobuf_buffer *buf); | 123 | struct videobuf_buffer *buf); |
124 | 124 | ||
125 | One way to ensure that a buffer is no longer under I/O is to pass it to: | 125 | One way to ensure that a buffer is no longer under I/O is to pass it to: |
126 | 126 | ||
@@ -138,21 +138,21 @@ first step is in the open() function, which must initialize the | |||
138 | videobuf queue. The function to use depends on the type of buffer used: | 138 | videobuf queue. The function to use depends on the type of buffer used: |
139 | 139 | ||
140 | void videobuf_queue_sg_init(struct videobuf_queue *q, | 140 | void videobuf_queue_sg_init(struct videobuf_queue *q, |
141 | struct videobuf_queue_ops *ops, | 141 | struct videobuf_queue_ops *ops, |
142 | struct device *dev, | 142 | struct device *dev, |
143 | spinlock_t *irqlock, | 143 | spinlock_t *irqlock, |
144 | enum v4l2_buf_type type, | 144 | enum v4l2_buf_type type, |
145 | enum v4l2_field field, | 145 | enum v4l2_field field, |
146 | unsigned int msize, | 146 | unsigned int msize, |
147 | void *priv); | 147 | void *priv); |
148 | 148 | ||
149 | void videobuf_queue_vmalloc_init(struct videobuf_queue *q, | 149 | void videobuf_queue_vmalloc_init(struct videobuf_queue *q, |
150 | struct videobuf_queue_ops *ops, | 150 | struct videobuf_queue_ops *ops, |
151 | struct device *dev, | 151 | struct device *dev, |
152 | spinlock_t *irqlock, | 152 | spinlock_t *irqlock, |
153 | enum v4l2_buf_type type, | 153 | enum v4l2_buf_type type, |
154 | enum v4l2_field field, | 154 | enum v4l2_field field, |
155 | unsigned int msize, | 155 | unsigned int msize, |
156 | void *priv); | 156 | void *priv); |
157 | 157 | ||
158 | void videobuf_queue_dma_contig_init(struct videobuf_queue *q, | 158 | void videobuf_queue_dma_contig_init(struct videobuf_queue *q, |
@@ -183,11 +183,11 @@ easy to do that with the same code. To implement read(), the driver need | |||
183 | only make a call to one of: | 183 | only make a call to one of: |
184 | 184 | ||
185 | ssize_t videobuf_read_one(struct videobuf_queue *q, | 185 | ssize_t videobuf_read_one(struct videobuf_queue *q, |
186 | char __user *data, size_t count, | 186 | char __user *data, size_t count, |
187 | loff_t *ppos, int nonblocking); | 187 | loff_t *ppos, int nonblocking); |
188 | 188 | ||
189 | ssize_t videobuf_read_stream(struct videobuf_queue *q, | 189 | ssize_t videobuf_read_stream(struct videobuf_queue *q, |
190 | char __user *data, size_t count, | 190 | char __user *data, size_t count, |
191 | loff_t *ppos, int vbihack, int nonblocking); | 191 | loff_t *ppos, int vbihack, int nonblocking); |
192 | 192 | ||
193 | Either one of these functions will read frame data into data, returning the | 193 | Either one of these functions will read frame data into data, returning the |
@@ -240,15 +240,15 @@ the many ioctl() commands made available to user space. A number of these | |||
240 | calls. The relevant helper functions are: | 240 | calls. The relevant helper functions are: |
241 | 241 | ||
242 | int videobuf_reqbufs(struct videobuf_queue *q, | 242 | int videobuf_reqbufs(struct videobuf_queue *q, |
243 | struct v4l2_requestbuffers *req); | 243 | struct v4l2_requestbuffers *req); |
244 | int videobuf_querybuf(struct videobuf_queue *q, struct v4l2_buffer *b); | 244 | int videobuf_querybuf(struct videobuf_queue *q, struct v4l2_buffer *b); |
245 | int videobuf_qbuf(struct videobuf_queue *q, struct v4l2_buffer *b); | 245 | int videobuf_qbuf(struct videobuf_queue *q, struct v4l2_buffer *b); |
246 | int videobuf_dqbuf(struct videobuf_queue *q, struct v4l2_buffer *b, | 246 | int videobuf_dqbuf(struct videobuf_queue *q, struct v4l2_buffer *b, |
247 | int nonblocking); | 247 | int nonblocking); |
248 | int videobuf_streamon(struct videobuf_queue *q); | 248 | int videobuf_streamon(struct videobuf_queue *q); |
249 | int videobuf_streamoff(struct videobuf_queue *q); | 249 | int videobuf_streamoff(struct videobuf_queue *q); |
250 | int videobuf_cgmbuf(struct videobuf_queue *q, struct video_mbuf *mbuf, | 250 | int videobuf_cgmbuf(struct videobuf_queue *q, struct video_mbuf *mbuf, |
251 | int count); | 251 | int count); |
252 | 252 | ||
253 | So, for example, a VIDIOC_REQBUFS call turns into a call to the driver's | 253 | So, for example, a VIDIOC_REQBUFS call turns into a call to the driver's |
254 | vidioc_reqbufs() callback which, in turn, usually only needs to locate the | 254 | vidioc_reqbufs() callback which, in turn, usually only needs to locate the |