[libcamera-devel] [PATCH 0/5] Enumerate CameraLens by following sensor's ancillary links

Hanlin Chen hanlinchen at chromium.org
Mon Nov 29 12:42:33 CET 2021


On Fri, Nov 26, 2021 at 8:48 PM Laurent Pinchart
<laurent.pinchart at ideasonboard.com> wrote:
>
> Hi Han-lin,
>
> On Fri, Nov 26, 2021 at 07:32:51PM +0800, Hanlin Chen wrote:
> > On Fri, Nov 26, 2021 at 2:44 PM Jean-Michel Hautbois wrote:
> > > On 26/11/2021 01:31, Daniel Scally wrote:
> > > > Hello All
> > > >
> > > > This series is an attempt at making the incoming VCM support a little more
> > > > agnostic, by following the new style of media links described in my series to
> > > > linux-media [0] to find VCMs connected to Sensors in libcamera. It's based on
> > > > top of a series from Han-Lin [1] and another from Kate Hsuan [2] (both of which
> > > > series are pretty neat, by the way)
> > >
> > > Thanks to all three of you for this great work !
> > >
> > > How can I test it ? Which kernel for SGo2 is usable (A branch would be
> > > great) ?
> >
> > Many thanks for the great work, Daniel!
> > I just tested it on Chromebook with kernel v5.4, and it works perfectly.
>
> Does it work out of the box, without a need for any kernel or firmware
> change ? That would be great, it would certainly facilitate adoption.
>
I didn't change anything in the firmware or kernel, except for
Daniel's patches ;-).

> > > > The general principle of the new links is an entity to entity link which will
> > > > be connected by the kernel between a sensor's entity and an entity for a VCM
> > > > device, where those entities have a fwnode match based on the "lens-focus"
> > > > property against the sensor. These links are then discovered by libcamera and
> > > > followed to create an instance of the CameraLens class, replacing the matching
> > > > on driver/device names in Han-Lin's original series.
> > > >
> > > > With the CameraLens available to carry out the controlling of the VCM, I have
> > > > pushed the controls to the pipeline handler and removed both all of that
> > > > functionality (including the open()/close() of the VCM subdev) from Kate's
> > > > work instead.
> > > >
> > > > Thanks
> > > > Dan
> > > >
> > > > [0] https://patchwork.linuxtv.org/project/linux-media/list/?series=6792
> > > > [1] https://patchwork.libcamera.org/project/libcamera/list/?series=2743
> > > > [2] https://patchwork.libcamera.org/project/libcamera/list/?series=2750
> > > >
> > > > Daniel Scally (5):
> > > >    libcamera: Add support for ancillary links to MediaLink
> > > >    libcamera: media_device: Handle ancillary links in populateLinks()
> > > >    libcamera: ipu3-cio2: Discover VCMs through ancillary links
> > > >    ipa: ipu3: Send lens controls to pipeline handler
> > > >    ipa: ipu3: af: Remove v4l2 interaction from AF algorithm
> > > >
> > > >   include/libcamera/internal/media_object.h | 10 +++++
> > > >   include/linux/media.h                     |  1 +
> > > >   src/ipa/ipu3/algorithms/af.cpp            | 29 +------------
> > > >   src/ipa/ipu3/algorithms/af.h              |  3 --
> > > >   src/ipa/ipu3/ipu3.cpp                     |  4 ++
> > > >   src/libcamera/media_device.cpp            | 52 ++++++++++++++++-------
> > > >   src/libcamera/media_object.cpp            | 24 ++++++++++-
> > > >   src/libcamera/pipeline/ipu3/cio2.cpp      | 45 +++++++++++---------
> > > >   8 files changed, 101 insertions(+), 67 deletions(-)
> > > >
>
> --
> Regards,
>
> Laurent Pinchart


More information about the libcamera-devel mailing list