diff options
Diffstat (limited to 'include/media/videobuf2-core.h')
-rw-r--r-- | include/media/videobuf2-core.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index ea766525a268..bef53ce555d2 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h | |||
@@ -252,10 +252,13 @@ struct vb2_buffer { | |||
252 | * receive buffers with @buf_queue callback before | 252 | * receive buffers with @buf_queue callback before |
253 | * @start_streaming is called; the driver gets the number | 253 | * @start_streaming is called; the driver gets the number |
254 | * of already queued buffers in count parameter; driver | 254 | * of already queued buffers in count parameter; driver |
255 | * can return an error if hardware fails or not enough | 255 | * can return an error if hardware fails, in that case all |
256 | * buffers has been queued, in such case all buffers that | 256 | * buffers that have been already given by the @buf_queue |
257 | * have been already given by the @buf_queue callback are | 257 | * callback are invalidated. |
258 | * invalidated. | 258 | * If there were not enough queued buffers to start |
259 | * streaming, then this callback returns -ENOBUFS, and the | ||
260 | * vb2 core will retry calling @start_streaming when a new | ||
261 | * buffer is queued. | ||
259 | * @stop_streaming: called when 'streaming' state must be disabled; driver | 262 | * @stop_streaming: called when 'streaming' state must be disabled; driver |
260 | * should stop any DMA transactions or wait until they | 263 | * should stop any DMA transactions or wait until they |
261 | * finish and give back all buffers it got from buf_queue() | 264 | * finish and give back all buffers it got from buf_queue() |
@@ -323,6 +326,9 @@ struct v4l2_fh; | |||
323 | * @done_wq: waitqueue for processes waiting for buffers ready to be dequeued | 326 | * @done_wq: waitqueue for processes waiting for buffers ready to be dequeued |
324 | * @alloc_ctx: memory type/allocator-specific contexts for each plane | 327 | * @alloc_ctx: memory type/allocator-specific contexts for each plane |
325 | * @streaming: current streaming state | 328 | * @streaming: current streaming state |
329 | * @retry_start_streaming: start_streaming() was called, but there were not enough | ||
330 | * buffers queued. If set, then retry calling start_streaming when | ||
331 | * queuing a new buffer. | ||
326 | * @fileio: file io emulator internal data, used only if emulator is active | 332 | * @fileio: file io emulator internal data, used only if emulator is active |
327 | */ | 333 | */ |
328 | struct vb2_queue { | 334 | struct vb2_queue { |
@@ -355,6 +361,7 @@ struct vb2_queue { | |||
355 | unsigned int plane_sizes[VIDEO_MAX_PLANES]; | 361 | unsigned int plane_sizes[VIDEO_MAX_PLANES]; |
356 | 362 | ||
357 | unsigned int streaming:1; | 363 | unsigned int streaming:1; |
364 | unsigned int retry_start_streaming:1; | ||
358 | 365 | ||
359 | struct vb2_fileio_data *fileio; | 366 | struct vb2_fileio_data *fileio; |
360 | }; | 367 | }; |