]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
[media] uvcvideo: Allow userptr IO mode
authorJavier Martin <javier.martin@vista-silicon.com>
Mon, 2 Jan 2012 14:12:23 +0000 (11:12 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 19 Mar 2012 17:07:13 +0000 (14:07 -0300)
Userptr can be very useful if a UVC camera is requested to use video
buffers allocated by another processing device. So that buffers don't
need to be copied.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/uvc/uvc_queue.c

index 518f77d3a4d820bad41129be9ab623077ada54dc..8f54e24e3f3555855c531ce9f35f2b91e7a074f6 100644 (file)
@@ -126,7 +126,7 @@ void uvc_queue_init(struct uvc_video_queue *queue, enum v4l2_buf_type type,
                    int drop_corrupted)
 {
        queue->queue.type = type;
-       queue->queue.io_modes = VB2_MMAP;
+       queue->queue.io_modes = VB2_MMAP | VB2_USERPTR;
        queue->queue.drv_priv = queue;
        queue->queue.buf_struct_size = sizeof(struct uvc_buffer);
        queue->queue.ops = &uvc_queue_qops;