|
@@ -358,12 +358,12 @@ struct vb2_buffer {
|
|
* driver can return an error if hardware fails, in that
|
|
* driver can return an error if hardware fails, in that
|
|
* case all buffers that have been already given by
|
|
* case all buffers that have been already given by
|
|
* the @buf_queue callback are to be returned by the driver
|
|
* the @buf_queue callback are to be returned by the driver
|
|
- * by calling vb2_buffer_done() with %VB2_BUF_STATE_QUEUED.
|
|
|
|
- * If you need a minimum number of buffers before you can
|
|
|
|
- * start streaming, then set
|
|
|
|
- * &vb2_queue->min_buffers_needed. If that is non-zero then
|
|
|
|
- * @start_streaming won't be called until at least that
|
|
|
|
- * many buffers have been queued up by userspace.
|
|
|
|
|
|
+ * by calling vb2_buffer_done() with %VB2_BUF_STATE_QUEUED
|
|
|
|
+ * or %VB2_BUF_STATE_REQUEUEING. If you need a minimum
|
|
|
|
+ * number of buffers before you can start streaming, then
|
|
|
|
+ * set &vb2_queue->min_buffers_needed. 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
|
|
* @stop_streaming: called when 'streaming' state must be disabled; driver
|
|
* should stop any DMA transactions or wait until they
|
|
* should stop any DMA transactions or wait until they
|
|
* finish and give back all buffers it got from &buf_queue
|
|
* finish and give back all buffers it got from &buf_queue
|
|
@@ -601,8 +601,9 @@ void *vb2_plane_cookie(struct vb2_buffer *vb, unsigned int plane_no);
|
|
* @state: state of the buffer, as defined by &enum vb2_buffer_state.
|
|
* @state: state of the buffer, as defined by &enum vb2_buffer_state.
|
|
* Either %VB2_BUF_STATE_DONE if the operation finished
|
|
* Either %VB2_BUF_STATE_DONE if the operation finished
|
|
* successfully, %VB2_BUF_STATE_ERROR if the operation finished
|
|
* successfully, %VB2_BUF_STATE_ERROR if the operation finished
|
|
- * with an error or %VB2_BUF_STATE_QUEUED if the driver wants to
|
|
|
|
- * requeue buffers.
|
|
|
|
|
|
+ * with an error or any of %VB2_BUF_STATE_QUEUED or
|
|
|
|
+ * %VB2_BUF_STATE_REQUEUEING if the driver wants to
|
|
|
|
+ * requeue buffers (see below).
|
|
*
|
|
*
|
|
* This function should be called by the driver after a hardware operation on
|
|
* This function should be called by the driver after a hardware operation on
|
|
* a buffer is finished and the buffer may be returned to userspace. The driver
|
|
* a buffer is finished and the buffer may be returned to userspace. The driver
|
|
@@ -613,7 +614,12 @@ void *vb2_plane_cookie(struct vb2_buffer *vb, unsigned int plane_no);
|
|
* While streaming a buffer can only be returned in state DONE or ERROR.
|
|
* While streaming a buffer can only be returned in state DONE or ERROR.
|
|
* The &vb2_ops->start_streaming op can also return them in case the DMA engine
|
|
* The &vb2_ops->start_streaming op can also return them in case the DMA engine
|
|
* cannot be started for some reason. In that case the buffers should be
|
|
* cannot be started for some reason. In that case the buffers should be
|
|
- * returned with state QUEUED to put them back into the queue.
|
|
|
|
|
|
+ * returned with state QUEUED or REQUEUEING to put them back into the queue.
|
|
|
|
+ *
|
|
|
|
+ * %VB2_BUF_STATE_REQUEUEING is like %VB2_BUF_STATE_QUEUED, but it also calls
|
|
|
|
+ * &vb2_ops->buf_queue to queue buffers back to the driver. Note that calling
|
|
|
|
+ * vb2_buffer_done(..., VB2_BUF_STATE_REQUEUEING) from interrupt context will
|
|
|
|
+ * result in &vb2_ops->buf_queue being called in interrupt context as well.
|
|
*/
|
|
*/
|
|
void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state);
|
|
void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state);
|
|
|
|
|