]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/staging/media/omap4iss/iss_video.c
Merge tag 'nios2-v3.20-rc1' of git://git.rocketboards.org/linux-socfpga-next
[mirror_ubuntu-bionic-kernel.git] / drivers / staging / media / omap4iss / iss_video.c
index cdee5966cbcafea4b91cd6e5f99b68218af96966..69550445a341ff6f39a571a9c72c37ecab435a04 100644 (file)
@@ -25,9 +25,6 @@
 #include "iss_video.h"
 #include "iss.h"
 
-static unsigned debug;
-module_param(debug, uint, 0644);
-MODULE_PARM_DESC(debug, "activates debug info");
 
 /* -----------------------------------------------------------------------------
  * Helper functions
@@ -772,6 +769,14 @@ iss_video_qbuf(struct file *file, void *fh, struct v4l2_buffer *b)
        return vb2_qbuf(&vfh->queue, b);
 }
 
+static int
+iss_video_expbuf(struct file *file, void *fh, struct v4l2_exportbuffer *e)
+{
+       struct iss_video_fh *vfh = to_iss_video_fh(fh);
+
+       return vb2_expbuf(&vfh->queue, e);
+}
+
 static int
 iss_video_dqbuf(struct file *file, void *fh, struct v4l2_buffer *b)
 {
@@ -1021,6 +1026,7 @@ static const struct v4l2_ioctl_ops iss_video_ioctl_ops = {
        .vidioc_reqbufs                 = iss_video_reqbufs,
        .vidioc_querybuf                = iss_video_querybuf,
        .vidioc_qbuf                    = iss_video_qbuf,
+       .vidioc_expbuf                  = iss_video_expbuf,
        .vidioc_dqbuf                   = iss_video_dqbuf,
        .vidioc_streamon                = iss_video_streamon,
        .vidioc_streamoff               = iss_video_streamoff,
@@ -1044,8 +1050,6 @@ static int iss_video_open(struct file *file)
        if (handle == NULL)
                return -ENOMEM;
 
-       video->video.debug = debug;
-
        v4l2_fh_init(&handle->vfh, &video->video);
        v4l2_fh_add(&handle->vfh);
 
@@ -1071,7 +1075,7 @@ static int iss_video_open(struct file *file)
        q = &handle->queue;
 
        q->type = video->type;
-       q->io_modes = VB2_MMAP;
+       q->io_modes = VB2_MMAP | VB2_DMABUF;
        q->drv_priv = handle;
        q->ops = &iss_video_vb2ops;
        q->mem_ops = &vb2_dma_contig_memops;