2 * Memory-to-memory device framework for Video for Linux 2.
4 * Helper functions for devices that use memory buffers for both source
7 * Copyright (c) 2009 Samsung Electronics Co., Ltd.
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version
17 #ifndef _MEDIA_V4L2_MEM2MEM_H
18 #define _MEDIA_V4L2_MEM2MEM_H
20 #include <media/videobuf2-v4l2.h>
23 * struct v4l2_m2m_ops - mem-to-mem device driver callbacks
24 * @device_run: required. Begin the actual job (transaction) inside this
26 * The job does NOT have to end before this callback returns
27 * (and it will be the usual case). When the job finishes,
28 * v4l2_m2m_job_finish() has to be called.
29 * @job_ready: optional. Should return 0 if the driver does not have a job
30 * fully prepared to run yet (i.e. it will not be able to finish a
31 * transaction without sleeping). If not provided, it will be
32 * assumed that one source and one destination buffer are all
33 * that is required for the driver to perform one full transaction.
34 * This method may not sleep.
35 * @job_abort: optional. Informs the driver that it has to abort the currently
36 * running transaction as soon as possible (i.e. as soon as it can
37 * stop the device safely; e.g. in the next interrupt handler),
38 * even if the transaction would not have been finished by then.
39 * After the driver performs the necessary steps, it has to call
40 * v4l2_m2m_job_finish() (as if the transaction ended normally).
41 * This function does not have to (and will usually not) wait
42 * until the device enters a state when it can be stopped.
45 void (*device_run)(void *priv);
46 int (*job_ready)(void *priv);
47 void (*job_abort)(void *priv);
54 * struct v4l2_m2m_queue_ctx - represents a queue for buffers ready to be
57 * @q: pointer to struct &vb2_queue
58 * @rdy_queue: List of V4L2 mem-to-mem queues
59 * @rdy_spinlock: spin lock to protect the struct usage
60 * @num_rdy: number of buffers ready to be processed
61 * @buffered: is the queue buffered?
63 * Queue for buffers ready to be processed as soon as this
64 * instance receives access to the device.
67 struct v4l2_m2m_queue_ctx {
70 struct list_head rdy_queue;
71 spinlock_t rdy_spinlock;
77 * struct v4l2_m2m_ctx - Memory to memory context structure
79 * @q_lock: struct &mutex lock
80 * @m2m_dev: opaque pointer to the internal data to handle M2M context
81 * @cap_q_ctx: Capture (output to memory) queue context
82 * @out_q_ctx: Output (input from memory) queue context
83 * @queue: List of memory to memory contexts
84 * @job_flags: Job queue flags, used internally by v4l2-mem2mem.c:
85 * %TRANS_QUEUED, %TRANS_RUNNING and %TRANS_ABORT.
86 * @finished: Wait queue used to signalize when a job queue finished.
87 * @priv: Instance private data
89 * The memory to memory context is specific to a file handle, NOT to e.g.
93 /* optional cap/out vb2 queues lock */
96 /* internal use only */
97 struct v4l2_m2m_dev *m2m_dev;
99 struct v4l2_m2m_queue_ctx cap_q_ctx;
101 struct v4l2_m2m_queue_ctx out_q_ctx;
103 /* For device job queue */
104 struct list_head queue;
105 unsigned long job_flags;
106 wait_queue_head_t finished;
112 * struct v4l2_m2m_buffer - Memory to memory buffer
114 * @vb: pointer to struct &vb2_v4l2_buffer
115 * @list: list of m2m buffers
117 struct v4l2_m2m_buffer {
118 struct vb2_v4l2_buffer vb;
119 struct list_head list;
123 * v4l2_m2m_get_curr_priv() - return driver private data for the currently
124 * running instance or NULL if no instance is running
126 * @m2m_dev: opaque pointer to the internal data to handle M2M context
128 void *v4l2_m2m_get_curr_priv(struct v4l2_m2m_dev *m2m_dev);
131 * v4l2_m2m_get_vq() - return vb2_queue for the given type
133 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
134 * @type: type of the V4L2 buffer, as defined by enum &v4l2_buf_type
136 struct vb2_queue *v4l2_m2m_get_vq(struct v4l2_m2m_ctx *m2m_ctx,
137 enum v4l2_buf_type type);
140 * v4l2_m2m_try_schedule() - check whether an instance is ready to be added to
141 * the pending job queue and add it if so.
143 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
145 * There are three basic requirements an instance has to meet to be able to run:
146 * 1) at least one source buffer has to be queued,
147 * 2) at least one destination buffer has to be queued,
148 * 3) streaming has to be on.
150 * If a queue is buffered (for example a decoder hardware ringbuffer that has
151 * to be drained before doing streamoff), allow scheduling without v4l2 buffers
154 * There may also be additional, custom requirements. In such case the driver
155 * should supply a custom callback (job_ready in v4l2_m2m_ops) that should
156 * return 1 if the instance is ready.
157 * An example of the above could be an instance that requires more than one
158 * src/dst buffer per transaction.
160 void v4l2_m2m_try_schedule(struct v4l2_m2m_ctx *m2m_ctx);
163 * v4l2_m2m_job_finish() - inform the framework that a job has been finished
164 * and have it clean up
166 * @m2m_dev: opaque pointer to the internal data to handle M2M context
167 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
169 * Called by a driver to yield back the device after it has finished with it.
170 * Should be called as soon as possible after reaching a state which allows
171 * other instances to take control of the device.
173 * This function has to be called only after &v4l2_m2m_ops->device_run
174 * callback has been called on the driver. To prevent recursion, it should
175 * not be called directly from the &v4l2_m2m_ops->device_run callback though.
177 void v4l2_m2m_job_finish(struct v4l2_m2m_dev *m2m_dev,
178 struct v4l2_m2m_ctx *m2m_ctx);
181 v4l2_m2m_buf_done(struct vb2_v4l2_buffer *buf, enum vb2_buffer_state state)
183 vb2_buffer_done(&buf->vb2_buf, state);
187 * v4l2_m2m_reqbufs() - multi-queue-aware REQBUFS multiplexer
189 * @file: pointer to struct &file
190 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
191 * @reqbufs: pointer to struct &v4l2_requestbuffers
193 int v4l2_m2m_reqbufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
194 struct v4l2_requestbuffers *reqbufs);
197 * v4l2_m2m_querybuf() - multi-queue-aware QUERYBUF multiplexer
199 * @file: pointer to struct &file
200 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
201 * @buf: pointer to struct &v4l2_buffer
203 * See v4l2_m2m_mmap() documentation for details.
205 int v4l2_m2m_querybuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
206 struct v4l2_buffer *buf);
209 * v4l2_m2m_qbuf() - enqueue a source or destination buffer, depending on
212 * @file: pointer to struct &file
213 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
214 * @buf: pointer to struct &v4l2_buffer
216 int v4l2_m2m_qbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
217 struct v4l2_buffer *buf);
220 * v4l2_m2m_dqbuf() - dequeue a source or destination buffer, depending on
223 * @file: pointer to struct &file
224 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
225 * @buf: pointer to struct &v4l2_buffer
227 int v4l2_m2m_dqbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
228 struct v4l2_buffer *buf);
231 * v4l2_m2m_prepare_buf() - prepare a source or destination buffer, depending on
234 * @file: pointer to struct &file
235 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
236 * @buf: pointer to struct &v4l2_buffer
238 int v4l2_m2m_prepare_buf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
239 struct v4l2_buffer *buf);
242 * v4l2_m2m_create_bufs() - create a source or destination buffer, depending
245 * @file: pointer to struct &file
246 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
247 * @create: pointer to struct &v4l2_create_buffers
249 int v4l2_m2m_create_bufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
250 struct v4l2_create_buffers *create);
253 * v4l2_m2m_expbuf() - export a source or destination buffer, depending on
256 * @file: pointer to struct &file
257 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
258 * @eb: pointer to struct &v4l2_exportbuffer
260 int v4l2_m2m_expbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
261 struct v4l2_exportbuffer *eb);
264 * v4l2_m2m_streamon() - turn on streaming for a video queue
266 * @file: pointer to struct &file
267 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
268 * @type: type of the V4L2 buffer, as defined by enum &v4l2_buf_type
270 int v4l2_m2m_streamon(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
271 enum v4l2_buf_type type);
274 * v4l2_m2m_streamoff() - turn off streaming for a video queue
276 * @file: pointer to struct &file
277 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
278 * @type: type of the V4L2 buffer, as defined by enum &v4l2_buf_type
280 int v4l2_m2m_streamoff(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
281 enum v4l2_buf_type type);
284 * v4l2_m2m_poll() - poll replacement, for destination buffers only
286 * @file: pointer to struct &file
287 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
288 * @wait: pointer to struct &poll_table_struct
290 * Call from the driver's poll() function. Will poll both queues. If a buffer
291 * is available to dequeue (with dqbuf) from the source queue, this will
292 * indicate that a non-blocking write can be performed, while read will be
293 * returned in case of the destination queue.
295 __poll_t v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
296 struct poll_table_struct *wait);
299 * v4l2_m2m_mmap() - source and destination queues-aware mmap multiplexer
301 * @file: pointer to struct &file
302 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
303 * @vma: pointer to struct &vm_area_struct
305 * Call from driver's mmap() function. Will handle mmap() for both queues
306 * seamlessly for videobuffer, which will receive normal per-queue offsets and
307 * proper videobuf queue pointers. The differentiation is made outside videobuf
308 * by adding a predefined offset to buffers from one of the queues and
309 * subtracting it before passing it back to videobuf. Only drivers (and
310 * thus applications) receive modified offsets.
312 int v4l2_m2m_mmap(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
313 struct vm_area_struct *vma);
316 * v4l2_m2m_init() - initialize per-driver m2m data
318 * @m2m_ops: pointer to struct v4l2_m2m_ops
320 * Usually called from driver's ``probe()`` function.
322 * Return: returns an opaque pointer to the internal data to handle M2M context
324 struct v4l2_m2m_dev *v4l2_m2m_init(const struct v4l2_m2m_ops *m2m_ops);
326 #if defined(CONFIG_MEDIA_CONTROLLER)
327 void v4l2_m2m_unregister_media_controller(struct v4l2_m2m_dev *m2m_dev);
328 int v4l2_m2m_register_media_controller(struct v4l2_m2m_dev *m2m_dev,
329 struct video_device *vdev, int function);
332 v4l2_m2m_unregister_media_controller(struct v4l2_m2m_dev *m2m_dev)
337 v4l2_m2m_register_media_controller(struct v4l2_m2m_dev *m2m_dev,
338 struct video_device *vdev, int function)
345 * v4l2_m2m_release() - cleans up and frees a m2m_dev structure
347 * @m2m_dev: opaque pointer to the internal data to handle M2M context
349 * Usually called from driver's ``remove()`` function.
351 void v4l2_m2m_release(struct v4l2_m2m_dev *m2m_dev);
354 * v4l2_m2m_ctx_init() - allocate and initialize a m2m context
356 * @m2m_dev: opaque pointer to the internal data to handle M2M context
357 * @drv_priv: driver's instance private data
358 * @queue_init: a callback for queue type-specific initialization function
359 * to be used for initializing videobuf_queues
361 * Usually called from driver's ``open()`` function.
363 struct v4l2_m2m_ctx *v4l2_m2m_ctx_init(struct v4l2_m2m_dev *m2m_dev,
365 int (*queue_init)(void *priv, struct vb2_queue *src_vq, struct vb2_queue *dst_vq));
367 static inline void v4l2_m2m_set_src_buffered(struct v4l2_m2m_ctx *m2m_ctx,
370 m2m_ctx->out_q_ctx.buffered = buffered;
373 static inline void v4l2_m2m_set_dst_buffered(struct v4l2_m2m_ctx *m2m_ctx,
376 m2m_ctx->cap_q_ctx.buffered = buffered;
380 * v4l2_m2m_ctx_release() - release m2m context
382 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
384 * Usually called from driver's release() function.
386 void v4l2_m2m_ctx_release(struct v4l2_m2m_ctx *m2m_ctx);
389 * v4l2_m2m_buf_queue() - add a buffer to the proper ready buffers list.
391 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
392 * @vbuf: pointer to struct &vb2_v4l2_buffer
394 * Call from videobuf_queue_ops->ops->buf_queue, videobuf_queue_ops callback.
396 void v4l2_m2m_buf_queue(struct v4l2_m2m_ctx *m2m_ctx,
397 struct vb2_v4l2_buffer *vbuf);
400 * v4l2_m2m_num_src_bufs_ready() - return the number of source buffers ready for
403 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
406 unsigned int v4l2_m2m_num_src_bufs_ready(struct v4l2_m2m_ctx *m2m_ctx)
408 return m2m_ctx->out_q_ctx.num_rdy;
412 * v4l2_m2m_num_dst_bufs_ready() - return the number of destination buffers
415 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
418 unsigned int v4l2_m2m_num_dst_bufs_ready(struct v4l2_m2m_ctx *m2m_ctx)
420 return m2m_ctx->cap_q_ctx.num_rdy;
424 * v4l2_m2m_next_buf() - return next buffer from the list of ready buffers
426 * @q_ctx: pointer to struct @v4l2_m2m_queue_ctx
428 void *v4l2_m2m_next_buf(struct v4l2_m2m_queue_ctx *q_ctx);
431 * v4l2_m2m_next_src_buf() - return next source buffer from the list of ready
434 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
436 static inline void *v4l2_m2m_next_src_buf(struct v4l2_m2m_ctx *m2m_ctx)
438 return v4l2_m2m_next_buf(&m2m_ctx->out_q_ctx);
442 * v4l2_m2m_next_dst_buf() - return next destination buffer from the list of
445 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
447 static inline void *v4l2_m2m_next_dst_buf(struct v4l2_m2m_ctx *m2m_ctx)
449 return v4l2_m2m_next_buf(&m2m_ctx->cap_q_ctx);
453 * v4l2_m2m_last_buf() - return last buffer from the list of ready buffers
455 * @q_ctx: pointer to struct @v4l2_m2m_queue_ctx
457 void *v4l2_m2m_last_buf(struct v4l2_m2m_queue_ctx *q_ctx);
460 * v4l2_m2m_last_src_buf() - return last destination buffer from the list of
463 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
465 static inline void *v4l2_m2m_last_src_buf(struct v4l2_m2m_ctx *m2m_ctx)
467 return v4l2_m2m_last_buf(&m2m_ctx->out_q_ctx);
471 * v4l2_m2m_last_dst_buf() - return last destination buffer from the list of
474 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
476 static inline void *v4l2_m2m_last_dst_buf(struct v4l2_m2m_ctx *m2m_ctx)
478 return v4l2_m2m_last_buf(&m2m_ctx->cap_q_ctx);
482 * v4l2_m2m_for_each_dst_buf() - iterate over a list of destination ready
485 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
486 * @b: current buffer of type struct v4l2_m2m_buffer
488 #define v4l2_m2m_for_each_dst_buf(m2m_ctx, b) \
489 list_for_each_entry(b, &m2m_ctx->cap_q_ctx.rdy_queue, list)
492 * v4l2_m2m_for_each_src_buf() - iterate over a list of source ready buffers
494 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
495 * @b: current buffer of type struct v4l2_m2m_buffer
497 #define v4l2_m2m_for_each_src_buf(m2m_ctx, b) \
498 list_for_each_entry(b, &m2m_ctx->out_q_ctx.rdy_queue, list)
501 * v4l2_m2m_for_each_dst_buf_safe() - iterate over a list of destination ready
504 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
505 * @b: current buffer of type struct v4l2_m2m_buffer
506 * @n: used as temporary storage
508 #define v4l2_m2m_for_each_dst_buf_safe(m2m_ctx, b, n) \
509 list_for_each_entry_safe(b, n, &m2m_ctx->cap_q_ctx.rdy_queue, list)
512 * v4l2_m2m_for_each_src_buf_safe() - iterate over a list of source ready
515 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
516 * @b: current buffer of type struct v4l2_m2m_buffer
517 * @n: used as temporary storage
519 #define v4l2_m2m_for_each_src_buf_safe(m2m_ctx, b, n) \
520 list_for_each_entry_safe(b, n, &m2m_ctx->out_q_ctx.rdy_queue, list)
523 * v4l2_m2m_get_src_vq() - return vb2_queue for source buffers
525 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
528 struct vb2_queue *v4l2_m2m_get_src_vq(struct v4l2_m2m_ctx *m2m_ctx)
530 return &m2m_ctx->out_q_ctx.q;
534 * v4l2_m2m_get_dst_vq() - return vb2_queue for destination buffers
536 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
539 struct vb2_queue *v4l2_m2m_get_dst_vq(struct v4l2_m2m_ctx *m2m_ctx)
541 return &m2m_ctx->cap_q_ctx.q;
545 * v4l2_m2m_buf_remove() - take off a buffer from the list of ready buffers and
548 * @q_ctx: pointer to struct @v4l2_m2m_queue_ctx
550 void *v4l2_m2m_buf_remove(struct v4l2_m2m_queue_ctx *q_ctx);
553 * v4l2_m2m_src_buf_remove() - take off a source buffer from the list of ready
554 * buffers and return it
556 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
558 static inline void *v4l2_m2m_src_buf_remove(struct v4l2_m2m_ctx *m2m_ctx)
560 return v4l2_m2m_buf_remove(&m2m_ctx->out_q_ctx);
564 * v4l2_m2m_dst_buf_remove() - take off a destination buffer from the list of
565 * ready buffers and return it
567 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
569 static inline void *v4l2_m2m_dst_buf_remove(struct v4l2_m2m_ctx *m2m_ctx)
571 return v4l2_m2m_buf_remove(&m2m_ctx->cap_q_ctx);
575 * v4l2_m2m_buf_remove_by_buf() - take off exact buffer from the list of ready
578 * @q_ctx: pointer to struct @v4l2_m2m_queue_ctx
579 * @vbuf: the buffer to be removed
581 void v4l2_m2m_buf_remove_by_buf(struct v4l2_m2m_queue_ctx *q_ctx,
582 struct vb2_v4l2_buffer *vbuf);
585 * v4l2_m2m_src_buf_remove_by_buf() - take off exact source buffer from the list
588 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
589 * @vbuf: the buffer to be removed
591 static inline void v4l2_m2m_src_buf_remove_by_buf(struct v4l2_m2m_ctx *m2m_ctx,
592 struct vb2_v4l2_buffer *vbuf)
594 v4l2_m2m_buf_remove_by_buf(&m2m_ctx->out_q_ctx, vbuf);
598 * v4l2_m2m_dst_buf_remove_by_buf() - take off exact destination buffer from the
599 * list of ready buffers
601 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
602 * @vbuf: the buffer to be removed
604 static inline void v4l2_m2m_dst_buf_remove_by_buf(struct v4l2_m2m_ctx *m2m_ctx,
605 struct vb2_v4l2_buffer *vbuf)
607 v4l2_m2m_buf_remove_by_buf(&m2m_ctx->cap_q_ctx, vbuf);
610 struct vb2_v4l2_buffer *
611 v4l2_m2m_buf_remove_by_idx(struct v4l2_m2m_queue_ctx *q_ctx, unsigned int idx);
613 static inline struct vb2_v4l2_buffer *
614 v4l2_m2m_src_buf_remove_by_idx(struct v4l2_m2m_ctx *m2m_ctx, unsigned int idx)
616 return v4l2_m2m_buf_remove_by_idx(&m2m_ctx->out_q_ctx, idx);
619 static inline struct vb2_v4l2_buffer *
620 v4l2_m2m_dst_buf_remove_by_idx(struct v4l2_m2m_ctx *m2m_ctx, unsigned int idx)
622 return v4l2_m2m_buf_remove_by_idx(&m2m_ctx->cap_q_ctx, idx);
625 /* v4l2 request helper */
627 void v4l2_m2m_request_queue(struct media_request *req);
629 /* v4l2 ioctl helpers */
631 int v4l2_m2m_ioctl_reqbufs(struct file *file, void *priv,
632 struct v4l2_requestbuffers *rb);
633 int v4l2_m2m_ioctl_create_bufs(struct file *file, void *fh,
634 struct v4l2_create_buffers *create);
635 int v4l2_m2m_ioctl_querybuf(struct file *file, void *fh,
636 struct v4l2_buffer *buf);
637 int v4l2_m2m_ioctl_expbuf(struct file *file, void *fh,
638 struct v4l2_exportbuffer *eb);
639 int v4l2_m2m_ioctl_qbuf(struct file *file, void *fh,
640 struct v4l2_buffer *buf);
641 int v4l2_m2m_ioctl_dqbuf(struct file *file, void *fh,
642 struct v4l2_buffer *buf);
643 int v4l2_m2m_ioctl_prepare_buf(struct file *file, void *fh,
644 struct v4l2_buffer *buf);
645 int v4l2_m2m_ioctl_streamon(struct file *file, void *fh,
646 enum v4l2_buf_type type);
647 int v4l2_m2m_ioctl_streamoff(struct file *file, void *fh,
648 enum v4l2_buf_type type);
649 int v4l2_m2m_fop_mmap(struct file *file, struct vm_area_struct *vma);
650 __poll_t v4l2_m2m_fop_poll(struct file *file, poll_table *wait);
652 #endif /* _MEDIA_V4L2_MEM2MEM_H */