On Tue, Nov 20, 2018 at 10:41:42AM +0100, Hans Verkuil wrote: > On 11/20/2018 10:27 AM, Sakari Ailus wrote: > > Hi Hans, > > > > On Tue, Nov 20, 2018 at 09:58:43AM +0100, Hans Verkuil wrote: > >> Add new buffer capability flags to indicate if the VIDIOC_PREPARE_BUF or > >> VIDIOC_CREATE_BUFS ioctls are supported. > > > > Are there practical benefits from the change for the user space? > > The more important ioctl to know about is PREPARE_BUF. I noticed this when working > on v4l2-compliance: the only way to know for an application if PREPARE_BUF exists > is by trying it, but then you already have prepared a buffer. That's not what you > want in the application, you need a way to know up front if prepare_buf is present > or not without having to actually execute it. > > CREATE_BUFS was added because not all drivers support it. It can be dropped since > it is possible to test for the existence of CREATE_BUFS without actually allocating > anything, but if I'm adding V4L2_BUF_CAP_SUPPORTS_PREPARE_BUF anyway, then it is > trivial to add V4L2_BUF_CAP_SUPPORTS_CREATE_BUFS as well to avoid an additional > ioctl call. > > Hmm, I should have explained this in the commit log. Please add: Acked-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> -- Sakari Ailus sakari.ailus@xxxxxxxxxxxxxxx