diff mbox

[6/6] v4l: s5p-tv: mixer: integrate with shrbuf

Message ID 4E37C956.1080008@samsung.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Marek Szyprowski Aug. 2, 2011, 9:54 a.m. UTC
From: Tomasz Stanislawski <t.stanislaws@samsung.com>

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
  drivers/media/video/s5p-tv/mixer_video.c |   11 ++++++++++-
  1 files changed, 10 insertions(+), 1 deletions(-)

  {
      struct mxr_layer *layer = video_drvdata(file);
@@ -618,6 +626,7 @@ static const struct v4l2_ioctl_ops mxr_ioctl_ops = {
      .vidioc_querybuf = mxr_querybuf,
      .vidioc_qbuf = mxr_qbuf,
      .vidioc_dqbuf = mxr_dqbuf,
+    .vidioc_expbuf = mxr_expbuf,
      /* Streaming control */
      .vidioc_streamon = mxr_streamon,
      .vidioc_streamoff = mxr_streamoff,
@@ -972,7 +981,7 @@ struct mxr_layer *mxr_base_layer_create(struct 
mxr_device *mdev,

      layer->vb_queue = (struct vb2_queue) {
          .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
-        .io_modes = VB2_MMAP | VB2_USERPTR,
+        .io_modes = VB2_MMAP | VB2_USERPTR | VB2_SHRBUF,
          .drv_priv = layer,
          .buf_struct_size = sizeof(struct mxr_buffer),
          .ops = &mxr_video_qops,
diff mbox

Patch

diff --git a/drivers/media/video/s5p-tv/mixer_video.c 
b/drivers/media/video/s5p-tv/mixer_video.c
index 43ac22f..52cb51a 100644
--- a/drivers/media/video/s5p-tv/mixer_video.c
+++ b/drivers/media/video/s5p-tv/mixer_video.c
@@ -591,6 +591,14 @@  static int mxr_dqbuf(struct file *file, void *priv, 
struct v4l2_buffer *p)
      return vb2_dqbuf(&layer->vb_queue, p, file->f_flags & O_NONBLOCK);
  }

+static int mxr_expbuf(struct file *file, void *priv, unsigned int offset)
+{
+    struct mxr_layer *layer = video_drvdata(file);
+
+    mxr_dbg(layer->mdev, "%s:%d\n", __func__, __LINE__);
+    return vb2_expbuf(&layer->vb_queue, offset);
+}
+
  static int mxr_streamon(struct file *file, void *priv, enum 
v4l2_buf_type i)