All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] [media] v4l2-mem2mem: add v4l2_m2m_create_bufs helper
@ 2013-05-21  8:16 Philipp Zabel
  2013-05-21  8:16 ` [PATCH 2/2] [media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS support Philipp Zabel
  2013-05-29 12:28 ` [PATCH 1/2] [media] v4l2-mem2mem: add v4l2_m2m_create_bufs helper Kamil Debski
  0 siblings, 2 replies; 4+ messages in thread
From: Philipp Zabel @ 2013-05-21  8:16 UTC (permalink / raw)
  To: linux-media
  Cc: Mauro Carvalho Chehab, Javier Martin, Pawel Osciak, John Sheu,
	Philipp Zabel

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/media/v4l2-core/v4l2-mem2mem.c | 14 ++++++++++++++
 include/media/v4l2-mem2mem.h           |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c
index 66f599f..357efa4 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
  */
diff --git a/include/media/v4l2-mem2mem.h b/include/media/v4l2-mem2mem.h
index d3eef01..0f4555b 100644
--- a/include/media/v4l2-mem2mem.h
+++ b/include/media/v4l2-mem2mem.h
@@ -110,6 +110,8 @@ int v4l2_m2m_qbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
 		  struct v4l2_buffer *buf);
 int v4l2_m2m_dqbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
 		   struct v4l2_buffer *buf);
+int v4l2_m2m_create_bufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
+			 struct v4l2_create_buffers *create);
 
 int v4l2_m2m_expbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
 		   struct v4l2_exportbuffer *eb);
-- 
1.8.2.rc2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-29 12:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-21  8:16 [PATCH 1/2] [media] v4l2-mem2mem: add v4l2_m2m_create_bufs helper Philipp Zabel
2013-05-21  8:16 ` [PATCH 2/2] [media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS support Philipp Zabel
2013-05-29 12:28 ` [PATCH 1/2] [media] v4l2-mem2mem: add v4l2_m2m_create_bufs helper Kamil Debski
2013-05-29 12:50   ` Philipp Zabel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.