summaryrefslogtreecommitdiff
path: root/include/media/v4l2-ioctl.h
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>2024-03-14 16:32:24 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2024-03-25 12:00:44 +0100
commita3293a85381ec9680aa2929547fbc76c5d87a1b2 (patch)
tree775ded5621e70cec625921830c48dc3d2c97faae /include/media/v4l2-ioctl.h
parent5fb19f20926127d082d7dbc2b5c4d7b0b215ce03 (diff)
downloadlwn-a3293a85381ec9680aa2929547fbc76c5d87a1b2.tar.gz
lwn-a3293a85381ec9680aa2929547fbc76c5d87a1b2.zip
media: v4l2: Add REMOVE_BUFS ioctl
VIDIOC_REMOVE_BUFS ioctl allows to remove buffers from a queue. The number of buffers to remove in given by count field of struct v4l2_remove_buffers and the range start at the index specified in the same structure. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil: vidioc-remove-bufs.rst: mention no bufs are freed on error]
Diffstat (limited to 'include/media/v4l2-ioctl.h')
-rw-r--r--include/media/v4l2-ioctl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
index edb733f21604..bdbb7e542321 100644
--- a/include/media/v4l2-ioctl.h
+++ b/include/media/v4l2-ioctl.h
@@ -163,6 +163,8 @@ struct v4l2_fh;
* :ref:`VIDIOC_CREATE_BUFS <vidioc_create_bufs>` ioctl
* @vidioc_prepare_buf: pointer to the function that implements
* :ref:`VIDIOC_PREPARE_BUF <vidioc_prepare_buf>` ioctl
+ * @vidioc_remove_bufs: pointer to the function that implements
+ * :ref:`VIDIOC_REMOVE_BUFS <vidioc_remove_bufs>` ioctl
* @vidioc_overlay: pointer to the function that implements
* :ref:`VIDIOC_OVERLAY <vidioc_overlay>` ioctl
* @vidioc_g_fbuf: pointer to the function that implements
@@ -422,6 +424,8 @@ struct v4l2_ioctl_ops {
struct v4l2_create_buffers *b);
int (*vidioc_prepare_buf)(struct file *file, void *fh,
struct v4l2_buffer *b);
+ int (*vidioc_remove_bufs)(struct file *file, void *fh,
+ struct v4l2_remove_buffers *d);
int (*vidioc_overlay)(struct file *file, void *fh, unsigned int i);
int (*vidioc_g_fbuf)(struct file *file, void *fh,