media: core: Report the maximum possible number of buffers for the queue
Use one of the struct v4l2_create_buffers reserved bytes to report the maximum possible number of buffers for the queue. V4l2 framework set V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS flags in queue capabilities so userland can know when the field is valid. Does the same change in v4l2_create_buffers32 structure. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
c838530d23
commit
d055a76c00
@@ -1035,6 +1035,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
|
||||
@@ -2605,6 +2606,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 {
|
||||
@@ -2614,7 +2618,8 @@ struct v4l2_create_buffers {
|
||||
struct v4l2_format format;
|
||||
__u32 capabilities;
|
||||
__u32 flags;
|
||||
__u32 reserved[6];
|
||||
__u32 max_num_buffers;
|
||||
__u32 reserved[5];
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user