Merge branch 'for_3.8-rc1' into v4l_for_linus
[deliverable/linux.git] / drivers / media / platform / s5p-fimc / fimc-capture.c
index 3fc896b8eeae76002875e98475f448d88efd7dd0..fdb6740248a73f58bd2c7ab42c72f03991d907f0 100644 (file)
@@ -556,8 +556,7 @@ static int fimc_capture_close(struct file *file)
 
        dbg("pid: %d, state: 0x%lx", task_pid_nr(current), fimc->state);
 
-       if (mutex_lock_interruptible(&fimc->lock))
-               return -ERESTARTSYS;
+       mutex_lock(&fimc->lock);
 
        if (--fimc->vid_cap.refcnt == 0) {
                clear_bit(ST_CAPT_BUSY, &fimc->state);
@@ -1231,6 +1230,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,
+                         struct v4l2_exportbuffer *eb)
+{
+       struct fimc_dev *fimc = video_drvdata(file);
+
+       return vb2_expbuf(&fimc->vid_cap.vbq, eb);
+}
+
 static int fimc_cap_dqbuf(struct file *file, void *priv,
                           struct v4l2_buffer *buf)
 {
@@ -1355,6 +1362,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_prepare_buf             = fimc_cap_prepare_buf,
        .vidioc_create_bufs             = fimc_cap_create_bufs,
@@ -1730,7 +1738,7 @@ static 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_DMABUF;
        q->drv_priv = fimc->vid_cap.ctx;
        q->ops = &fimc_capture_qops;
        q->mem_ops = &vb2_dma_contig_memops;
This page took 0.029624 seconds and 5 git commands to generate.