All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Tomasz Figa <tfiga@chromium.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	Ricardo Ribalda <ribalda@chromium.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv3 5/6] media: uvcvideo: add UVC 1.5 ROI control
Date: Wed, 24 Mar 2021 12:05:09 +0900	[thread overview]
Message-ID: <YFqsZXUuQP9H+Cud@google.com> (raw)
In-Reply-To: <CAAFQd5CJBPtLo22u2dM-vOGmqaD2e=TU5Qv1eoKcHsxuumgXGw@mail.gmail.com>

On (21/03/24 12:00), Tomasz Figa wrote:
[..]
> > I guess in our case we need to talk about rectangle,auto-controls tuple
> > that we send to firmware
> >
> >         rect {
> >                 (0, 0), (INT_MAX, INT_MAX)
> >         }
> >         auto-controls {
> >                 INT_MAX
> >         }
> >
> > 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
will accept, including autocontrols.

  reply	other threads:[~2021-03-24  3:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19  5:53 [PATCHv3 0/6] media: uvcvideo: implement UVC 1.5 ROI Sergey Senozhatsky
2021-03-19  5:53 ` [PATCHv3 1/6] media: v4l UAPI: add ROI selection targets Sergey Senozhatsky
2021-03-19  5:53 ` [PATCHv3 2/6] media: v4l UAPI: document " Sergey Senozhatsky
2021-03-23 16:05   ` Ricardo Ribalda
2021-03-19  5:53 ` [PATCHv3 3/6] media: v4l UAPI: add ROI auto-controls flags Sergey Senozhatsky
2021-03-23 16:04   ` Ricardo Ribalda
2021-03-24  2:22     ` Sergey Senozhatsky
2021-03-24  7:28       ` Ricardo Ribalda
2021-03-24  7:35         ` Sergey Senozhatsky
2021-03-19  5:53 ` [PATCHv3 4/6] media: v4l UAPI: document " Sergey Senozhatsky
2021-03-19  5:53 ` [PATCHv3 5/6] media: uvcvideo: add UVC 1.5 ROI control Sergey Senozhatsky
2021-03-23 16:16   ` Ricardo Ribalda
2021-03-24  2:01     ` Sergey Senozhatsky
2021-03-24  2:14       ` Tomasz Figa
2021-03-24  2:31         ` Sergey Senozhatsky
2021-03-24  2:34           ` Tomasz Figa
2021-03-24  2:52             ` Sergey Senozhatsky
2021-03-24  3:00               ` Tomasz Figa
2021-03-24  3:05                 ` Sergey Senozhatsky [this message]
2021-03-24  3:08                   ` Sergey Senozhatsky
2021-03-19  5:53 ` [PATCHv3 6/6] MAINTAINERS: update Senozhatsky email address Sergey Senozhatsky
2021-03-19  5:56   ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YFqsZXUuQP9H+Cud@google.com \
    --to=senozhatsky@chromium.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.org \
    --cc=tfiga@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.