On Tue, Aug 28, 2018 at 10:49 PM Hans Verkuil <hverkuil@xxxxxxxxx> wrote: > > From: Hans Verkuil <hans.verkuil@xxxxxxxxx> > > Hi all, > > This patch series sits on top of my v18 series for the Request API. > It makes some final (?) changes as discussed in: > > https://www.mail-archive.com/linux-media@xxxxxxxxxxxxxxx/msg134419.html > > and: > > https://www.spinics.net/lists/linux-media/msg138596.html > > The combined v18 patches + this series is available here: > > https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=reqv18-1 > > Updated v4l-utils for this is available here: > > https://git.linuxtv.org/hverkuil/v4l-utils.git/log/?h=request > > Userspace visible changes: > > - Invalid request_fd values now return -EINVAL instead of -ENOENT. > - It is no longer possible to use VIDIOC_G_EXT_CTRLS for requests > that are not completed. -EACCES is returned in that case. > - Attempting to use requests if requests are not supported by the driver > will result in -EACCES instead of -EPERM. > > Driver visible changes (important for the cedrus driver!): > > Drivers should set the new vb2_queue 'supports_request' bitfield to 1 > if a vb2_queue can support requests. Otherwise the queue cannot be > used with requests. > > This bitfield is also used to fill in the new capabilities field > in struct v4l2_requestbuffers and v4l2_create_buffers. > > Changes since v1: > > - Updated patch 4/10 to explain how to query the capabilities > with REQBUFS/CREATE_BUFS with a minimum of side-effects > (requested by Tomasz). > - Added patches 6-10: > 6: Sakari found a corner case: when accessing a request the > request has to be protected from being re-inited. New > media_request_(un)lock_for_access helpers are added for this. > 7: use these helpers in g_ext_ctrls. > 8: make s/try_ext_ctrls more robust by keeping the request > references until we're fully done setting/trying the controls. > 9: Change two more EPERM's to EACCES. EPERM suggests that you can > fix it by changing permissions somehow, but in this case the > driver simply doesn't support requests at all. > 10: Update the request documentation based on Laurent's comments: > https://www.spinics.net/lists/linux-media/msg139152.html > To do: split off the V4L2 specifics into a V4L2 specific > rst file. But this will take more time and is for later. For all the patches which still don't have my Reviewed-by, except patch 9/10 ("media-request: EPERM -> EACCES"): Reviewed-by: Tomasz Figa <tfiga@xxxxxxxxxxxx> Thanks a lot for this great work! Best regards, Tomasz