From: Michael Riesch <michael.riesch@wolfvision.net>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Michael Riesch via B4 Relay
<devnull+michael.riesch.wolfvision.net@kernel.org>,
linux-kernel@vger.kernel.org,
Matthias Fend <Matthias.Fend@wolfvision.net>,
libcamera-devel@lists.libcamera.org, linux-media@vger.kernel.org,
hverkuil@xs4all.nl,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Alexander Brotzge <Alexander.Brotzge@wolfvision.net>,
Dieter Mathis <Dieter.Mathis@wolfvision.net>
Subject: Re: [libcamera-devel] [PATCH RFC 1/4] media: v4l2-ctrls: add lens group status controls for zoom and focus
Date: Wed, 19 Apr 2023 13:24:58 +0200 [thread overview]
Message-ID: <45fea085-54c3-157e-6459-adaaf1edebf5@wolfvision.net> (raw)
In-Reply-To: <ZD+t5QYH20Y8+8MV@kekkonen.localdomain>
Hi Sakari,
On 4/19/23 11:01, Sakari Ailus wrote:
> Hi Michael,
>
> On Mon, Apr 17, 2023 at 02:38:20PM +0200, Michael Riesch wrote:
>> Hi Sakari,
>>
>> On 4/12/23 17:12, Sakari Ailus wrote:
>>> Hi Dave, Michael,
>>>
>>> On Wed, Apr 12, 2023 at 02:55:56PM +0100, Dave Stevenson wrote:
>>>>>> If the ranges aren't updated, where should that out-of-range lens
>>>>>> movement leave the lens?
>>>>>
>>>>> This is up to the hardware controller, but I would guess it typically
>>>>> stops one step before disaster. Wherever that may be, the error
>>>>> condition and the current position can be read out via this new STATUS
>>>>> control.
>>>>>
>>>>> Does this sound good so far?
>>>>
>>>> Sounds reasonable, but I'm not the gatekeeper (that would be Sakari or
>>>> Laurent), and I'm just expressing my views based on the lenses I've
>>>> encountered.
>>>> All of my lenses have a single drive for focus, a single drive for
>>>> zoom, and where there are multiple elements they are all connected
>>>> mechanically. Your setup sounds far more complex and is likely to need
>>>> a more extensive driver, but it'd be nice to not unnecessarily
>>>> overcomplicate the interface.
>>>
>>> Could we also have a driver that uses these new controls?
>>
>> If you are referring to the driver for our custom lens controller, then
>> I have to say that it is under development and simply not ready for
>> release yet. Also, the decision has not yet been made whether or not
>> this will be an open-source driver.
>>
>> A different approach could be the adaptation of the vimc-lens driver,
>> which currently only supports FOCUS_ABSOLUTE. But this would raise
>> several implementation questions and at least for me this would be a
>> nontrivial task.
>>
>> Is it required to have a driver for this interface (in the sense that
>> the patches cannot be accepted otherwise)?
>
> That has been traditionally required, and a virtual driver isn't usually
> considered enough. There are at least two reasons for this. The first one
> being that if the driver isn't reviewable and targetting upstream it may be
> difficult to figure out whether the interface changes are the right ones
> for that driver. This is perhaps a lesser concern here. Secondly, there is
> also unwillingness to add interface elements that might never be supported
> by the kernel itself --- this is effectively just dead code.
>
> Also cc Hans and Laurent.
I understand your concerns. Cc: Alexander and Dieter
We aim to be an open-source friendly company. If you are OK with us
submitting a driver that targets very custom hardware that is only
available in integrated form in our products (and not, for instance,
available for sale as a standalone device), then we are prepared to
submit the driver sources for consideration for inclusion in mainline
Linux. Would this be acceptable?
As I already stated above, it will take us some time to prepare
everything in a form that is suitable for submission. Now should I
submit the next iteration(s) of the series at hand as RFC or as regular
patch series?
>>> The controls themselves appear reasonable to me as well. I guess there are
>>> changes to be made based on the discussion?
>>
>> I'd summarize that whether or not the status controls are compound
>> controls of the type V4L2_CTRL_TYPE_LENS_STATUS is the open question.
>>
>> As a potential follow-up question I recently asked myself if the struct
>> v4l2_ctrl_lens_status should contain trailing reserved bytes for future
>> extension (no idea, though, what this could be).
>>
>> Alternatively, we could come up with "V4L2_CID_FOCUS_CURRENT (integer)"
>> for the current position and "V4L2_CID_FOCUS_STATUS (bitmask)" (and add
>> further controls when they are needed. Here, we lose atomicity but maybe
>> this can be ignored. One could assume that all relevant controls are
>> read out with a single ioctl which provides at least some level of
>> atomicity.
>
> There might be something that could be done in the control framework to
> address this. But it's not something that can be expected to happen soon.
>
> I'd perhaps keep them separate, not to make it a compound control just for
> the access reason. But I certainly don't have a strong opinion about it.
After some further considerations, and following Dave's and your
comments, I'll keep them separate.
Discussion to be continued with v2.
Best regards,
Michael
>
>>
>> Any comments and/or recommendations to this open question would be much
>> appreciated.
>>
>> Other review comments will be incorporated in the next iteration of this
>> series as well, but they are quite straightforward.
>
next prev parent reply other threads:[~2023-04-19 11:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 14:31 [PATCH RFC 0/4] media: v4l2-ctrls: add controls for complex lens controller devices Michael Riesch via B4 Relay
2023-04-06 14:31 ` [PATCH RFC 1/4] media: v4l2-ctrls: add lens group status controls for zoom and focus Michael Riesch via B4 Relay
2023-04-06 15:16 ` [libcamera-devel] " Dave Stevenson
2023-04-11 17:33 ` Michael Riesch
2023-04-11 18:15 ` Dave Stevenson
2023-04-12 8:00 ` Michael Riesch
2023-04-12 11:50 ` Sakari Ailus
2023-04-12 11:57 ` Michael Riesch
2023-04-12 12:05 ` Sakari Ailus
2023-04-12 13:43 ` Michael Riesch
2023-04-12 14:39 ` Sakari Ailus
2023-04-12 14:57 ` Dave Stevenson
2023-04-12 13:55 ` Dave Stevenson
2023-04-12 15:12 ` Sakari Ailus
2023-04-17 12:38 ` Michael Riesch
2023-04-19 9:01 ` Sakari Ailus
2023-04-19 11:24 ` Michael Riesch [this message]
2023-04-19 12:49 ` Dave Stevenson
2023-04-24 19:57 ` Sakari Ailus
2023-04-17 8:29 ` Michael Riesch
2023-04-06 14:31 ` [PATCH RFC 2/4] media: v4l2-ctrls: add lens group speed " Michael Riesch via B4 Relay
2023-04-06 14:31 ` [PATCH RFC 3/4] media: v4l2-ctrls: add lens calibration controls Michael Riesch via B4 Relay
2023-04-06 14:31 ` [PATCH RFC 4/4] media: v4l2-ctrls: add controls for individual zoom lenses Michael Riesch via B4 Relay
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=45fea085-54c3-157e-6459-adaaf1edebf5@wolfvision.net \
--to=michael.riesch@wolfvision.net \
--cc=Alexander.Brotzge@wolfvision.net \
--cc=Dieter.Mathis@wolfvision.net \
--cc=Matthias.Fend@wolfvision.net \
--cc=dave.stevenson@raspberrypi.com \
--cc=devnull+michael.riesch.wolfvision.net@kernel.org \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=libcamera-devel@lists.libcamera.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®