* [PATCH 2/2] [media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS support
2013-05-21 8:16 [PATCH 1/2] [media] v4l2-mem2mem: add v4l2_m2m_create_bufs helper Philipp Zabel
@ 2013-05-21 8:16 ` Philipp Zabel
2013-05-29 12:28 ` [PATCH 1/2] [media] v4l2-mem2mem: add v4l2_m2m_create_bufs helper Kamil Debski
1 sibling, 0 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/platform/coda.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index d64908a..0319114 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -576,6 +576,14 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
return v4l2_m2m_dqbuf(file, ctx->m2m_ctx, buf);
}
+static int vidioc_create_bufs(struct file *file, void *priv,
+ struct v4l2_create_buffers *create)
+{
+ struct coda_ctx *ctx = fh_to_ctx(priv);
+
+ return v4l2_m2m_create_bufs(file, ctx->m2m_ctx, create);
+}
+
static int vidioc_streamon(struct file *file, void *priv,
enum v4l2_buf_type type)
{
@@ -610,6 +618,7 @@ static const struct v4l2_ioctl_ops coda_ioctl_ops = {
.vidioc_qbuf = vidioc_qbuf,
.vidioc_dqbuf = vidioc_dqbuf,
+ .vidioc_create_bufs = vidioc_create_bufs,
.vidioc_streamon = vidioc_streamon,
.vidioc_streamoff = vidioc_streamoff,
--
1.8.2.rc2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH 1/2] [media] v4l2-mem2mem: add v4l2_m2m_create_bufs helper
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 ` Kamil Debski
2013-05-29 12:50 ` Philipp Zabel
1 sibling, 1 reply; 4+ messages in thread
From: Kamil Debski @ 2013-05-29 12:28 UTC (permalink / raw)
To: 'Philipp Zabel', linux-media
Cc: 'Mauro Carvalho Chehab', 'Javier Martin',
'Pawel Osciak', 'John Sheu'
Hi,
Thanks for the patch. May I ask you to use use checkpath next time
and keep whitespaces tidy? This time I fixed it (spaces changed to a tab).
Checkpatch:
------------------------------
ERROR: code indent should use tabs where possible
#41: FILE: drivers/media/v4l2-core/v4l2-mem2mem.c:384:
+ return vb2_create_bufs(vq, create);$
WARNING: please, no spaces at the start of a line
#41: FILE: drivers/media/v4l2-core/v4l2-mem2mem.c:384:
+ return vb2_create_bufs(vq, create);$
total: 1 errors, 1 warnings, 28 lines checked
Fix:
------------------------------
diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c
b/drivers/media/v4l2-core/v4l2-mem2mem.c
index 674e5a0..a756170 100644
--- a/drivers/media/v4l2-core/v4l2-mem2mem.c
+++ b/drivers/media/v4l2-core/v4l2-mem2mem.c
@@ -381,7 +381,7 @@ int v4l2_m2m_create_bufs(struct file *file, struct
v4l2_m2m_ctx *m2m_ctx,
struct vb2_queue *vq;
vq = v4l2_m2m_get_vq(m2m_ctx, create->format.type);
- return vb2_create_bufs(vq, create);
+ return vb2_create_bufs(vq, create);
}
EXPORT_SYMBOL_GPL(v4l2_m2m_create_bufs);
Best wishes,
--
Kamil Debski
Linux Kernel Developer
Samsung R&D Institute Poland
> -----Original Message-----
> From: linux-media-owner@vger.kernel.org [mailto:linux-media-
> owner@vger.kernel.org] On Behalf Of Philipp Zabel
> Sent: Tuesday, May 21, 2013 10:16 AM
> To: linux-media@vger.kernel.org
> Cc: Mauro Carvalho Chehab; Javier Martin; Pawel Osciak; John Sheu;
> Philipp Zabel
> Subject: [PATCH 1/2] [media] v4l2-mem2mem: add v4l2_m2m_create_bufs
> helper
>
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media"
> in the body of a message to majordomo@vger.kernel.org More majordomo
> info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread