[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YFqtLO2GhQrTpxsh@google.com>
Date: Wed, 24 Mar 2021 12:08:28 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Tomasz Figa <tfiga@...omium.org>
Cc: Ricardo Ribalda <ribalda@...omium.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>
Subject: Re: [PATCHv3 5/6] media: uvcvideo: add UVC 1.5 ROI control
On (21/03/24 12:05), Sergey Senozhatsky wrote:
> > > For ROI user-space also must provide valid auto-controls value, which
> > > normally requires GET_MIN/GET_MAX discovery.
> > >
> > > v4l2 selection API mentions only rectangle adjustments and errnos like
> > > -ERANGE also mention "It is not possible to adjust struct v4l2_rect r
> > > rectangle to satisfy all constraints given in the flags argument".
> > >
> > > So in case when auto-controls is out of supported range (out of
> > > GET_MIN, GET_MAX range) there is no way for us to tell user-space that
> > > auto-controls is wrong. We probably need silently pick up the first
> > > supported value, but not sure how well this will work out in the end.
> >
> > Shouldn't the autocontrol selection be done via a separate bitmask
> > control rather than some custom flags in the selection API?
>
> That selection must be done before we send ROI to the firmware.
> Firmware H that I have supports split controls - we can send
> ROI::rectangle and ROI::autocontrols separately. But other
> firmwares don't tolerate such a thing and by the time we issue
>
> uvc_query_ctrl(stream->dev,
> UVC_SET_CUR
> UVC_CT_REGION_OF_INTEREST_CONTROL
> roi,
> + sizeof(struct uvc_roi_rect))
>
> roi rectangle should be of size 5 * u16 and contain values that firmware
^^^ roi structure
> will accept, including autocontrols.
Powered by blists - more mailing lists