upstream: [media] uvcvideo: Support allocating buffers larger than the current frame...
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 18 Feb 2014 13:40:47 +0000 (10:40 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:58:59 +0000 (11:58 +0900)
commitfe17e0ee4ce50ff8d5727b4d47da4a7be56de9a9
treebb13978b28ab336f3ae9296966131bc70ac1238d
parent5a178906768b09fcdaa45aac1654def52c7075c1
upstream: [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