mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-12 00:43:36 -04:00
media: videodev2.h: add new capabilities for buffer types
VIDIOC_REQBUFS and VIDIOC_CREATE_BUFFERS will return capabilities telling userspace what the given buffer type is capable of. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
dc58a553ba
commit
f35f5d72e7
3 changed files with 65 additions and 4 deletions
|
@ -856,9 +856,16 @@ struct v4l2_requestbuffers {
|
|||
__u32 count;
|
||||
__u32 type; /* enum v4l2_buf_type */
|
||||
__u32 memory; /* enum v4l2_memory */
|
||||
__u32 reserved[2];
|
||||
__u32 capabilities;
|
||||
__u32 reserved[1];
|
||||
};
|
||||
|
||||
/* capabilities for struct v4l2_requestbuffers and v4l2_create_buffers */
|
||||
#define V4L2_BUF_CAP_SUPPORTS_MMAP (1 << 0)
|
||||
#define V4L2_BUF_CAP_SUPPORTS_USERPTR (1 << 1)
|
||||
#define V4L2_BUF_CAP_SUPPORTS_DMABUF (1 << 2)
|
||||
#define V4L2_BUF_CAP_SUPPORTS_REQUESTS (1 << 3)
|
||||
|
||||
/**
|
||||
* struct v4l2_plane - plane info for multi-planar buffers
|
||||
* @bytesused: number of bytes occupied by data in the plane (payload)
|
||||
|
@ -2319,6 +2326,7 @@ struct v4l2_dbg_chip_info {
|
|||
* return: number of created buffers
|
||||
* @memory: enum v4l2_memory; buffer memory type
|
||||
* @format: frame format, for which buffers are requested
|
||||
* @capabilities: capabilities of this buffer type.
|
||||
* @reserved: future extensions
|
||||
*/
|
||||
struct v4l2_create_buffers {
|
||||
|
@ -2326,7 +2334,8 @@ struct v4l2_create_buffers {
|
|||
__u32 count;
|
||||
__u32 memory;
|
||||
struct v4l2_format format;
|
||||
__u32 reserved[8];
|
||||
__u32 capabilities;
|
||||
__u32 reserved[7];
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue