diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/media/videobuf2-core.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 36e3e8e2d457..af4621109726 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h | |||
@@ -356,20 +356,24 @@ struct v4l2_fh; | |||
356 | * @gfp_flags: additional gfp flags used when allocating the buffers. | 356 | * @gfp_flags: additional gfp flags used when allocating the buffers. |
357 | * Typically this is 0, but it may be e.g. GFP_DMA or __GFP_DMA32 | 357 | * Typically this is 0, but it may be e.g. GFP_DMA or __GFP_DMA32 |
358 | * to force the buffer allocation to a specific memory zone. | 358 | * to force the buffer allocation to a specific memory zone. |
359 | * @min_buffers_needed: the minimum number of buffers needed before | ||
360 | * start_streaming() can be called. Used when a DMA engine | ||
361 | * cannot be started unless at least this number of buffers | ||
362 | * have been queued into the driver. | ||
359 | * | 363 | * |
360 | * @memory: current memory type used | 364 | * @memory: current memory type used |
361 | * @bufs: videobuf buffer structures | 365 | * @bufs: videobuf buffer structures |
362 | * @num_buffers: number of allocated/used buffers | 366 | * @num_buffers: number of allocated/used buffers |
363 | * @queued_list: list of buffers currently queued from userspace | 367 | * @queued_list: list of buffers currently queued from userspace |
368 | * @queued_count: number of buffers queued and ready for streaming. | ||
364 | * @owned_by_drv_count: number of buffers owned by the driver | 369 | * @owned_by_drv_count: number of buffers owned by the driver |
365 | * @done_list: list of buffers ready to be dequeued to userspace | 370 | * @done_list: list of buffers ready to be dequeued to userspace |
366 | * @done_lock: lock to protect done_list list | 371 | * @done_lock: lock to protect done_list list |
367 | * @done_wq: waitqueue for processes waiting for buffers ready to be dequeued | 372 | * @done_wq: waitqueue for processes waiting for buffers ready to be dequeued |
368 | * @alloc_ctx: memory type/allocator-specific contexts for each plane | 373 | * @alloc_ctx: memory type/allocator-specific contexts for each plane |
369 | * @streaming: current streaming state | 374 | * @streaming: current streaming state |
370 | * @retry_start_streaming: start_streaming() was called, but there were not enough | 375 | * @start_streaming_called: start_streaming() was called successfully and we |
371 | * buffers queued. If set, then retry calling start_streaming when | 376 | * started streaming. |
372 | * queuing a new buffer. | ||
373 | * @fileio: file io emulator internal data, used only if emulator is active | 377 | * @fileio: file io emulator internal data, used only if emulator is active |
374 | */ | 378 | */ |
375 | struct vb2_queue { | 379 | struct vb2_queue { |
@@ -385,6 +389,7 @@ struct vb2_queue { | |||
385 | unsigned int buf_struct_size; | 389 | unsigned int buf_struct_size; |
386 | u32 timestamp_flags; | 390 | u32 timestamp_flags; |
387 | gfp_t gfp_flags; | 391 | gfp_t gfp_flags; |
392 | u32 min_buffers_needed; | ||
388 | 393 | ||
389 | /* private: internal use only */ | 394 | /* private: internal use only */ |
390 | enum v4l2_memory memory; | 395 | enum v4l2_memory memory; |
@@ -392,6 +397,7 @@ struct vb2_queue { | |||
392 | unsigned int num_buffers; | 397 | unsigned int num_buffers; |
393 | 398 | ||
394 | struct list_head queued_list; | 399 | struct list_head queued_list; |
400 | unsigned int queued_count; | ||
395 | 401 | ||
396 | atomic_t owned_by_drv_count; | 402 | atomic_t owned_by_drv_count; |
397 | struct list_head done_list; | 403 | struct list_head done_list; |
@@ -402,7 +408,7 @@ struct vb2_queue { | |||
402 | unsigned int plane_sizes[VIDEO_MAX_PLANES]; | 408 | unsigned int plane_sizes[VIDEO_MAX_PLANES]; |
403 | 409 | ||
404 | unsigned int streaming:1; | 410 | unsigned int streaming:1; |
405 | unsigned int retry_start_streaming:1; | 411 | unsigned int start_streaming_called:1; |
406 | 412 | ||
407 | struct vb2_fileio_data *fileio; | 413 | struct vb2_fileio_data *fileio; |
408 | 414 | ||