]> git.baikalelectronics.ru Git - kernel.git/commit
[media] uvcvideo: Support allocating buffers larger than the current frame size
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 18 Feb 2014 13:40:47 +0000 (10:40 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 28 Feb 2014 16:24:00 +0000 (13:24 -0300)
commit3e3c68b77b1a7774a466a31da20cdbf5703550d4
tree3a2bfc75e83a9d981e705ccbffca290faa960193
parent11d57a337cea579874b48205e259d26c4e9e1fa9
[media] uvcvideo: Support allocating buffers larger than the current frame size

The queue_setup handler takes an optional format argument that can be
used to allocate buffers for a format different than the current format.
The uvcvideo driver doesn't support changing the format when buffers
have been allocated, but there's no reason not to support allocating
buffers larger than the minimum size.

When the format argument isn't NULL verify that the requested image size
is large enough for the current format and use it for the buffer size.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/uvc/uvc_queue.c