diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2013-05-21 07:16:28 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-03 18:51:11 (GMT) |
commit | 8b94ca61d7065fa7fa7bdb08ce31a9385be5205b (patch) | |
tree | fd433d2926ecb4ebd4b82a1454d2241e452ed166 /drivers/media | |
parent | 57183467c09555d985ae62b79c754e64279381df (diff) | |
download | linux-fsl-qoriq-8b94ca61d7065fa7fa7bdb08ce31a9385be5205b.tar.xz |
[media] v4l2-mem2mem: add v4l2_m2m_create_bufs helper
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-mem2mem.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index 9ac39b5..a756170 100644 --- a/drivers/media/v4l2-core/v4l2-mem2mem.c +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c @@ -372,6 +372,20 @@ int v4l2_m2m_dqbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, EXPORT_SYMBOL_GPL(v4l2_m2m_dqbuf); /** + * v4l2_m2m_create_bufs() - create a source or destination buffer, depending + * on the type + */ +int v4l2_m2m_create_bufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, + struct v4l2_create_buffers *create) +{ + struct vb2_queue *vq; + + vq = v4l2_m2m_get_vq(m2m_ctx, create->format.type); + return vb2_create_bufs(vq, create); +} +EXPORT_SYMBOL_GPL(v4l2_m2m_create_bufs); + +/** * v4l2_m2m_expbuf() - export a source or destination buffer, depending on * the type */ |