summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/videodev2.h
diff options
context:
space:
mode:
authorHans Verkuil2018-05-21 10:54:44 +0200
committerMauro Carvalho Chehab2018-08-31 17:16:57 +0200
commit62fed26ff4338eeccc702799be358bbb1471b76c (patch)
treeea4a6ce0251a918d97b18fbd5de0277359491d86 /include/uapi/linux/videodev2.h
parentmedia: vb2: drop VB2_BUF_STATE_PREPARED, use bool prepared/synced instead (diff)
downloadkernel-qcow2-linux-62fed26ff4338eeccc702799be358bbb1471b76c.tar.gz
kernel-qcow2-linux-62fed26ff4338eeccc702799be358bbb1471b76c.tar.xz
kernel-qcow2-linux-62fed26ff4338eeccc702799be358bbb1471b76c.zip
media: videodev2.h: Add request_fd field to v4l2_buffer
When queuing buffers allow for passing the request that should be associated with this buffer. If V4L2_BUF_FLAG_REQUEST_FD is set, then request_fd is used as the file descriptor. If a buffer is stored in a request, but not yet queued to the driver, then V4L2_BUF_FLAG_IN_REQUEST is set. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/uapi/linux/videodev2.h')
-rw-r--r--include/uapi/linux/videodev2.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index ec62d376ba61..2350151ce4ea 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -917,6 +917,7 @@ struct v4l2_plane {
* @length: size in bytes of the buffer (NOT its payload) for single-plane
* buffers (when type != *_MPLANE); number of elements in the
* planes array for multi-plane buffers
+ * @request_fd: fd of the request that this buffer should use
*
* Contains data exchanged by application and driver using one of the Streaming
* I/O methods.
@@ -941,7 +942,10 @@ struct v4l2_buffer {
} m;
__u32 length;
__u32 reserved2;
- __u32 reserved;
+ union {
+ __s32 request_fd;
+ __u32 reserved;
+ };
};
/* Flags for 'flags' field */
@@ -959,6 +963,8 @@ struct v4l2_buffer {
#define V4L2_BUF_FLAG_BFRAME 0x00000020
/* Buffer is ready, but the data contained within is corrupted. */
#define V4L2_BUF_FLAG_ERROR 0x00000040
+/* Buffer is added to an unqueued request */
+#define V4L2_BUF_FLAG_IN_REQUEST 0x00000080
/* timecode field is valid */
#define V4L2_BUF_FLAG_TIMECODE 0x00000100
/* Buffer is prepared for queuing */
@@ -977,6 +983,8 @@ struct v4l2_buffer {
#define V4L2_BUF_FLAG_TSTAMP_SRC_SOE 0x00010000
/* mem2mem encoder/decoder */
#define V4L2_BUF_FLAG_LAST 0x00100000
+/* request_fd is valid */
+#define V4L2_BUF_FLAG_REQUEST_FD 0x00800000
/**
* struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor