summaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core/v4l2-mem2mem.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-05-30 08:46:22 +0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-31 17:19:30 +0200
commit394dc588809158826e2877adb670391829f91c63 (patch)
tree0d8efd884d299507f54d857640cb5ebfa8c72d23 /drivers/media/v4l2-core/v4l2-mem2mem.c
parentmedia: videobuf2-core: integrate with media requests (diff)
downloadlinux-394dc588809158826e2877adb670391829f91c63.tar.xz
linux-394dc588809158826e2877adb670391829f91c63.zip
media: videobuf2-v4l2: integrate with media requests
This implements the V4L2 part of the request support. The main change is that vb2_qbuf and vb2_prepare_buf now have a new media_device pointer. This required changes to several drivers that did not use the vb2_ioctl_qbuf/prepare_buf helper functions. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-mem2mem.c')
-rw-r--r--drivers/media/v4l2-core/v4l2-mem2mem.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c
index ce9bd1b91210..4de8fa163fd3 100644
--- a/drivers/media/v4l2-core/v4l2-mem2mem.c
+++ b/drivers/media/v4l2-core/v4l2-mem2mem.c
@@ -473,11 +473,12 @@ EXPORT_SYMBOL_GPL(v4l2_m2m_querybuf);
int v4l2_m2m_qbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
struct v4l2_buffer *buf)
{
+ struct video_device *vdev = video_devdata(file);
struct vb2_queue *vq;
int ret;
vq = v4l2_m2m_get_vq(m2m_ctx, buf->type);
- ret = vb2_qbuf(vq, buf);
+ ret = vb2_qbuf(vq, vdev->v4l2_dev->mdev, buf);
if (!ret)
v4l2_m2m_try_schedule(m2m_ctx);
@@ -498,11 +499,12 @@ EXPORT_SYMBOL_GPL(v4l2_m2m_dqbuf);
int v4l2_m2m_prepare_buf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
struct v4l2_buffer *buf)
{
+ struct video_device *vdev = video_devdata(file);
struct vb2_queue *vq;
int ret;
vq = v4l2_m2m_get_vq(m2m_ctx, buf->type);
- ret = vb2_prepare_buf(vq, buf);
+ ret = vb2_prepare_buf(vq, vdev->v4l2_dev->mdev, buf);
if (!ret)
v4l2_m2m_try_schedule(m2m_ctx);