diff mbox series

[v4,1/4] v4l-utils: Add max_num_buffers field to v4l2_create_buffers struct

Message ID 20231027084732.17528-2-benjamin.gaignard@collabora.com
State Superseded
Headers show
Series v4l2-compliance: Add tests for DELETE_BUFS | expand

Commit Message

Benjamin Gaignard Oct. 27, 2023, 8:47 a.m. UTC
Add 'max_num_buffers' field to 'struct v4l2_create_buffers' and
define V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
 include/linux/videodev2.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 27680a39..e7312cfb 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -991,6 +991,7 @@  struct v4l2_requestbuffers {
 #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS		(1 << 4)
 #define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF	(1 << 5)
 #define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS		(1 << 6)
+#define V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS		(1 << 7)
 
 /**
  * struct v4l2_plane - plane info for multi-planar buffers
@@ -2545,6 +2546,9 @@  struct v4l2_dbg_chip_info {
  * @flags:	additional buffer management attributes (ignored unless the
  *		queue has V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS capability
  *		and configured for MMAP streaming I/O).
+ * @max_num_buffers: if V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS capability flag is set
+ *		this field indicate the maximum possible number of buffers
+ *		for this queue.
  * @reserved:	future extensions
  */
 struct v4l2_create_buffers {
@@ -2554,7 +2558,8 @@  struct v4l2_create_buffers {
 	struct v4l2_format	format;
 	__u32			capabilities;
 	__u32			flags;
-	__u32			reserved[6];
+	__u32			max_num_buffers;
+	__u32			reserved[5];
 };
 
 /*