diff mbox

[5/6] v4l: fimc: integrate capture i-face with shrbuf

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

Commit Message

Marek Szyprowski Aug. 2, 2011, 9:53 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-fimc/fimc-capture.c |   11 ++++++++++-
  1 files changed, 10 insertions(+), 1 deletions(-)

      .vidioc_streamoff        = fimc_cap_streamoff,
@@ -1422,7 +1431,7 @@ int fimc_register_capture_device(struct fimc_dev 
*fimc,
      q = &fimc->vid_cap.vbq;
      memset(q, 0, sizeof(*q));
      q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
-    q->io_modes = VB2_MMAP | VB2_USERPTR;
+    q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_SHRBUF;
      q->drv_priv = fimc->vid_cap.ctx;
      q->ops = &fimc_capture_qops;
      q->mem_ops = &vb2_dma_contig_memops;
diff mbox

Patch

diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c 
b/drivers/media/video/s5p-fimc/fimc-capture.c
index a16f359..0904263 100644
--- a/drivers/media/video/s5p-fimc/fimc-capture.c
+++ b/drivers/media/video/s5p-fimc/fimc-capture.c
@@ -981,6 +981,14 @@  static int fimc_cap_qbuf(struct file *file, void *priv,
      return vb2_qbuf(&fimc->vid_cap.vbq, buf);
  }

+static int fimc_cap_expbuf(struct file *file, void *priv,
+              unsigned int offset)
+{
+    struct fimc_dev *fimc = video_drvdata(file);
+
+    return vb2_expbuf(&fimc->vid_cap.vbq, offset);
+}
+
  static int fimc_cap_dqbuf(struct file *file, void *priv,
                 struct v4l2_buffer *buf)
  {
@@ -1051,6 +1059,7 @@  static const struct v4l2_ioctl_ops 
fimc_capture_ioctl_ops = {

      .vidioc_qbuf            = fimc_cap_qbuf,
      .vidioc_dqbuf            = fimc_cap_dqbuf,
+    .vidioc_expbuf            = fimc_cap_expbuf,

      .vidioc_streamon        = fimc_cap_streamon,