[media] vb2: fix videobuf2-core.h comments
authorHans Verkuil <hverkuil@xs4all.nl>
Wed, 23 Jul 2014 06:17:06 +0000 (03:17 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 25 Jul 2014 22:19:35 +0000 (19:19 -0300)
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>
include/media/videobuf2-core.h

index 1a262aeb174110802f96204bf3db31ba23132dfa..fc910a622451b2bb112bdd5ba784a7cadfcbb315 100644 (file)
@@ -294,15 +294,19 @@ struct vb2_buffer {
  *                     of already queued buffers in count parameter; driver
  *                     can return an error if hardware fails, in that case all
  *                     buffers that have been already given by the @buf_queue
- *                     callback are invalidated.
- *                     If there were not enough queued buffers to start
- *                     streaming, then this callback returns -ENOBUFS, and the
- *                     vb2 core will retry calling @start_streaming when a new
- *                     buffer is queued.
+ *                     callback are to be returned by the driver by calling
+ *                     @vb2_buffer_done(VB2_BUF_STATE_DEQUEUED).
+ *                     If you need a minimum number of buffers before you can
+ *                     start streaming, then set @min_buffers_needed in the
+ *                     vb2_queue structure. If that is non-zero then
+ *                     start_streaming won't be called until at least that
+ *                     many buffers have been queued up by userspace.
  * @stop_streaming:    called when 'streaming' state must be disabled; driver
  *                     should stop any DMA transactions or wait until they
  *                     finish and give back all buffers it got from buf_queue()
- *                     callback; may use vb2_wait_for_all_buffers() function
+ *                     callback by calling @vb2_buffer_done() with either
+ *                     VB2_BUF_STATE_DONE or VB2_BUF_STATE_ERROR; may use
+ *                     vb2_wait_for_all_buffers() function
  * @buf_queue:         passes buffer vb to the driver; driver may start
  *                     hardware operation on this buffer; driver should give
  *                     the buffer back by calling vb2_buffer_done() function;