History

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.

Benjamin Gaignard committed 3 years ago

Commit d055a761 parent c8385306 files · +26 −6Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/linux/videodev2.h+6−1
@@ -1035,6 +1035,7 @@ struct v4l2_requestbuffers { · 1034 unmodified lines
1035#define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4)1035#define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4)
1036#define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF (1 << 5)1036#define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF (1 << 5)
1037#define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS (1 << 6)1037#define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS (1 << 6)
1038#define V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS (1 << 7)
1038 1039
1039/**1040/**
1040 * struct v4l2_plane - plane info for multi-planar buffers1041 * struct v4l2_plane - plane info for multi-planar buffers
@@ -2605,6 +2606,9 @@ struct v4l2_dbg_chip_info { · 1564 unmodified lines
2605 * @flags: additional buffer management attributes (ignored unless the2606 * @flags: additional buffer management attributes (ignored unless the
2606 * queue has V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS capability2607 * queue has V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS capability
2607 * and configured for MMAP streaming I/O).2608 * and configured for MMAP streaming I/O).
2609 * @max_num_buffers: if V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS capability flag is set
2610 * this field indicate the maximum possible number of buffers
2611 * for this queue.
2608 * @reserved: future extensions2612 * @reserved: future extensions
2609 */2613 */
2610struct v4l2_create_buffers {2614struct v4l2_create_buffers {
@@ -2614,7 +2618,8 @@ struct v4l2_create_buffers { · 3 unmodified lines
2614 struct v4l2_format format;2618 struct v4l2_format format;
2615 __u32 capabilities;2619 __u32 capabilities;
2616 __u32 flags;2620 __u32 flags;
2617 __u32 reserved[6];2621 __u32 max_num_buffers;
2622 __u32 reserved[5];
2618};2623};
2619 2624
2620/*2625/*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t