[libcamera-devel,v2,0/7] Enumerate CameraLens by following sensor's ancillary links
mbox series

Message ID 20211203224230.38700-1-djrscally@gmail.com
Headers show
Series
  • Enumerate CameraLens by following sensor's ancillary links
Related show

Message

Daniel Scally Dec. 3, 2021, 10:42 p.m. UTC
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. Now that
Han-Lin's series is merged this is based on top of master, plus Kate's v3 [1]

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.

Series changes in v2: 

	- New patches #4, #5 and #6 adding some extra framework to the IPAIPU3
	and pipeline so that I can pass the lensControls as a ControlList in #7
	(which was previously #5).
	- Dropped the patch amending Kate's work, as Kate squashed it (thanks!)

Thanks
Dan

[1] https://patchwork.libcamera.org/patch/15011/

Daniel Scally (7):
  libcamera: Add members to MediaEntity to support ancillary entities
  libcamera: media_device: Handle ancillary links in populateLinks()
  libcamera: camera_sensor: Discover VCMs through ancillary links
  libcamera: camera_lens: Add function to fetch subdev controls
  libcamera: ipa: Add lens control member to ipu3 ipa interface
  libcamera: ipu3: Pass lens controls to config info
  ipa: ipu3: Send lens controls to pipeline handler

 include/libcamera/internal/camera_lens.h   |  4 ++
 include/libcamera/internal/camera_sensor.h |  1 +
 include/libcamera/internal/media_object.h  |  4 ++
 include/libcamera/ipa/ipu3.mojom           |  1 +
 include/linux/media.h                      |  1 +
 src/ipa/ipu3/ipu3.cpp                      | 10 +++++
 src/libcamera/camera_lens.cpp              | 11 ++++++
 src/libcamera/camera_sensor.cpp            | 42 ++++++++++++++++++++
 src/libcamera/media_device.cpp             | 46 +++++++++++++++-------
 src/libcamera/media_object.cpp             | 16 ++++++++
 src/libcamera/pipeline/ipu3/ipu3.cpp       |  5 +++
 11 files changed, 126 insertions(+), 15 deletions(-)