From: Javier Martin Date: Mon, 2 Jan 2012 14:12:23 +0000 (-0300) Subject: [media] uvcvideo: Allow userptr IO mode X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ab86e9e03d322396907dc8eb9215b136c728773e;p=mv-sheeva.git [media] uvcvideo: Allow userptr IO mode 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 Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/uvc/uvc_queue.c b/drivers/media/video/uvc/uvc_queue.c index 518f77d3a4d..8f54e24e3f3 100644 --- a/drivers/media/video/uvc/uvc_queue.c +++ b/drivers/media/video/uvc/uvc_queue.c @@ -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;