aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/videobuf2-core.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/videobuf2-core.h')
-rw-r--r--include/media/videobuf2-core.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index a15d1f1b319e..924e95e0a0a6 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -244,12 +244,23 @@ struct vb2_ops {
244 void (*buf_queue)(struct vb2_buffer *vb); 244 void (*buf_queue)(struct vb2_buffer *vb);
245}; 245};
246 246
247struct v4l2_fh;
248
247/** 249/**
248 * struct vb2_queue - a videobuf queue 250 * struct vb2_queue - a videobuf queue
249 * 251 *
250 * @type: queue type (see V4L2_BUF_TYPE_* in linux/videodev2.h 252 * @type: queue type (see V4L2_BUF_TYPE_* in linux/videodev2.h
251 * @io_modes: supported io methods (see vb2_io_modes enum) 253 * @io_modes: supported io methods (see vb2_io_modes enum)
252 * @io_flags: additional io flags (see vb2_fileio_flags enum) 254 * @io_flags: additional io flags (see vb2_fileio_flags enum)
255 * @lock: pointer to a mutex that protects the vb2_queue struct. The
256 * driver can set this to a mutex to let the v4l2 core serialize
257 * the queuing ioctls. If the driver wants to handle locking
258 * itself, then this should be set to NULL. This lock is not used
259 * by the videobuf2 core API.
260 * @owner: The filehandle that 'owns' the buffers, i.e. the filehandle
261 * that called reqbufs, create_buffers or started fileio.
262 * This field is not used by the videobuf2 core API, but it allows
263 * drivers to easily associate an owner filehandle with the queue.
253 * @ops: driver-specific callbacks 264 * @ops: driver-specific callbacks
254 * @mem_ops: memory allocator specific callbacks 265 * @mem_ops: memory allocator specific callbacks
255 * @drv_priv: driver private data 266 * @drv_priv: driver private data
@@ -273,6 +284,8 @@ struct vb2_queue {
273 enum v4l2_buf_type type; 284 enum v4l2_buf_type type;
274 unsigned int io_modes; 285 unsigned int io_modes;
275 unsigned int io_flags; 286 unsigned int io_flags;
287 struct mutex *lock;
288 struct v4l2_fh *owner;
276 289
277 const struct vb2_ops *ops; 290 const struct vb2_ops *ops;
278 const struct vb2_mem_ops *mem_ops; 291 const struct vb2_mem_ops *mem_ops;