Hi Hans, On Thu, Oct 29, 2015 at 05:24:25AM +0100, Hans Verkuil wrote: > From: Hans Verkuil <hans.verkuil@xxxxxxxxx> > > The queue_setup callback has a void pointer that is just for V4L2 > and is the pointer to the v4l2_format struct that was passed to > VIDIOC_CREATE_BUFS. The idea was that drivers would use the information > from that struct to buffers suitable for the requested format. > > After the vb2 split series this pointer is now a void pointer, > which is ugly, and the reality is that all existing drivers will > effectively just look at the sizeimage field of v4l2_format. > > To make this more generic the queue_setup callback is changed: > the void pointer is dropped, instead if the *num_planes argument > is 0, then use the current format size, if it is non-zero, then > it contains the number of requested planes and the sizes array > contains the requested sizes. If either is unsupported, then return > -EINVAL, otherwise use the requested size(s). Please don't. This effectively prevents allocating new buffers while streaming if they're for a different format than that used by the stream. That was the very point in struct v4l2_format being part of the argument to the IOCTL. If this is not used right now I could well imagine someone to need it sooner or later. -- Kind regards, Sakari Ailus e-mail: sakari.ailus@xxxxxx XMPP: sailus@xxxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html