aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/s5p-fimc/fimc-m2m.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/s5p-fimc/fimc-m2m.c')
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-m2m.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-m2m.c b/drivers/media/platform/s5p-fimc/fimc-m2m.c
index 62afed3162ea..1d21da4bd24b 100644
--- a/drivers/media/platform/s5p-fimc/fimc-m2m.c
+++ b/drivers/media/platform/s5p-fimc/fimc-m2m.c
@@ -105,7 +105,7 @@ static void fimc_device_run(void *priv)
105 struct fimc_frame *sf, *df; 105 struct fimc_frame *sf, *df;
106 struct fimc_dev *fimc; 106 struct fimc_dev *fimc;
107 unsigned long flags; 107 unsigned long flags;
108 u32 ret; 108 int ret;
109 109
110 if (WARN(!ctx, "Null context\n")) 110 if (WARN(!ctx, "Null context\n"))
111 return; 111 return;
@@ -439,6 +439,15 @@ static int fimc_m2m_dqbuf(struct file *file, void *fh,
439 return v4l2_m2m_dqbuf(file, ctx->m2m_ctx, buf); 439 return v4l2_m2m_dqbuf(file, ctx->m2m_ctx, buf);
440} 440}
441 441
442static int fimc_m2m_expbuf(struct file *file, void *fh,
443 struct v4l2_exportbuffer *eb)
444{
445 struct fimc_ctx *ctx = fh_to_ctx(fh);
446
447 return v4l2_m2m_expbuf(file, ctx->m2m_ctx, eb);
448}
449
450
442static int fimc_m2m_streamon(struct file *file, void *fh, 451static int fimc_m2m_streamon(struct file *file, void *fh,
443 enum v4l2_buf_type type) 452 enum v4l2_buf_type type)
444{ 453{
@@ -607,6 +616,7 @@ static const struct v4l2_ioctl_ops fimc_m2m_ioctl_ops = {
607 .vidioc_querybuf = fimc_m2m_querybuf, 616 .vidioc_querybuf = fimc_m2m_querybuf,
608 .vidioc_qbuf = fimc_m2m_qbuf, 617 .vidioc_qbuf = fimc_m2m_qbuf,
609 .vidioc_dqbuf = fimc_m2m_dqbuf, 618 .vidioc_dqbuf = fimc_m2m_dqbuf,
619 .vidioc_expbuf = fimc_m2m_expbuf,
610 .vidioc_streamon = fimc_m2m_streamon, 620 .vidioc_streamon = fimc_m2m_streamon,
611 .vidioc_streamoff = fimc_m2m_streamoff, 621 .vidioc_streamoff = fimc_m2m_streamoff,
612 .vidioc_g_crop = fimc_m2m_g_crop, 622 .vidioc_g_crop = fimc_m2m_g_crop,
@@ -622,7 +632,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq,
622 int ret; 632 int ret;
623 633
624 src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; 634 src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
625 src_vq->io_modes = VB2_MMAP | VB2_USERPTR; 635 src_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
626 src_vq->drv_priv = ctx; 636 src_vq->drv_priv = ctx;
627 src_vq->ops = &fimc_qops; 637 src_vq->ops = &fimc_qops;
628 src_vq->mem_ops = &vb2_dma_contig_memops; 638 src_vq->mem_ops = &vb2_dma_contig_memops;
@@ -633,7 +643,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq,
633 return ret; 643 return ret;
634 644
635 dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; 645 dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
636 dst_vq->io_modes = VB2_MMAP | VB2_USERPTR; 646 dst_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
637 dst_vq->drv_priv = ctx; 647 dst_vq->drv_priv = ctx;
638 dst_vq->ops = &fimc_qops; 648 dst_vq->ops = &fimc_qops;
639 dst_vq->mem_ops = &vb2_dma_contig_memops; 649 dst_vq->mem_ops = &vb2_dma_contig_memops;