diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2014-07-23 02:17:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-25 18:19:35 -0400 |
commit | ccf58cb4eac050ebe777cfcb209bc53d58f5fd79 (patch) | |
tree | 385a7bc450993342ccfb74d017c300575f87bb7a /include/media | |
parent | 5d0360a4f027576e5419d4a7c711c9ca0f1be8ca (diff) |
[media] vb2: fix videobuf2-core.h comments
A lot of work was done in vb2 to regulate how drivers and the vb2 core handle
buffer ownership, but inexplicably the videobuf2-core.h comments were never
updated. Do so now. The same was true for the replacement of the -ENOBUFS
mechanism by the min_buffers_needed field.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/videobuf2-core.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 1a262aeb1741..fc910a622451 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h | |||
@@ -294,15 +294,19 @@ struct vb2_buffer { | |||
294 | * of already queued buffers in count parameter; driver | 294 | * of already queued buffers in count parameter; driver |
295 | * can return an error if hardware fails, in that case all | 295 | * can return an error if hardware fails, in that case all |
296 | * buffers that have been already given by the @buf_queue | 296 | * buffers that have been already given by the @buf_queue |
297 | * callback are invalidated. | 297 | * callback are to be returned by the driver by calling |
298 | * If there were not enough queued buffers to start | 298 | * @vb2_buffer_done(VB2_BUF_STATE_DEQUEUED). |
299 | * streaming, then this callback returns -ENOBUFS, and the | 299 | * If you need a minimum number of buffers before you can |
300 | * vb2 core will retry calling @start_streaming when a new | 300 | * start streaming, then set @min_buffers_needed in the |
301 | * buffer is queued. | 301 | * vb2_queue structure. If that is non-zero then |
302 | * start_streaming won't be called until at least that | ||
303 | * many buffers have been queued up by userspace. | ||
302 | * @stop_streaming: called when 'streaming' state must be disabled; driver | 304 | * @stop_streaming: called when 'streaming' state must be disabled; driver |
303 | * should stop any DMA transactions or wait until they | 305 | * should stop any DMA transactions or wait until they |
304 | * finish and give back all buffers it got from buf_queue() | 306 | * finish and give back all buffers it got from buf_queue() |
305 | * callback; may use vb2_wait_for_all_buffers() function | 307 | * callback by calling @vb2_buffer_done() with either |
308 | * VB2_BUF_STATE_DONE or VB2_BUF_STATE_ERROR; may use | ||
309 | * vb2_wait_for_all_buffers() function | ||
306 | * @buf_queue: passes buffer vb to the driver; driver may start | 310 | * @buf_queue: passes buffer vb to the driver; driver may start |
307 | * hardware operation on this buffer; driver should give | 311 | * hardware operation on this buffer; driver should give |
308 | * the buffer back by calling vb2_buffer_done() function; | 312 | * the buffer back by calling vb2_buffer_done() function; |