[libcamera-devel,v2,6/7] libcamera: ipu3: Pass lens controls to config info
diff mbox series

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

Commit Message

Daniel Scally Dec. 3, 2021, 10:42 p.m. UTC
When configuring the pipeline we want to share the controls for any
VCM device against the sensor too - pass them to the lensControls
member of configInfo

Signed-off-by: Daniel Scally <djrscally@gmail.com>
---
Changes in v2:

	- New patch

 src/libcamera/pipeline/ipu3/ipu3.cpp | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Laurent Pinchart Dec. 4, 2021, 12:26 a.m. UTC | #1
Hi Daniel,

Thank you for the patch.

On Fri, Dec 03, 2021 at 10:42:29PM +0000, Daniel Scally wrote:
> When configuring the pipeline we want to share the controls for any
> VCM device against the sensor too - pass them to the lensControls
> member of configInfo
> 
> Signed-off-by: Daniel Scally <djrscally@gmail.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> Changes in v2:
> 
> 	- New patch
> 
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 1215bdb8..4386d3e9 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -656,6 +656,11 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)
>  
>  	ipa::ipu3::IPAConfigInfo configInfo;
>  	configInfo.sensorControls = data->cio2_.sensor()->controls();
> +
> +	CameraLens *lens = data->cio2_.sensor()->focusLens();
> +	if (lens)
> +		configInfo.lensControls = lens->controls();
> +
>  	configInfo.sensorInfo = sensorInfo;
>  	configInfo.bdsOutputSize = config->imguConfig().bds;
>  	configInfo.iif = config->imguConfig().iif;

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 1215bdb8..4386d3e9 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -656,6 +656,11 @@  int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)
 
 	ipa::ipu3::IPAConfigInfo configInfo;
 	configInfo.sensorControls = data->cio2_.sensor()->controls();
+
+	CameraLens *lens = data->cio2_.sensor()->focusLens();
+	if (lens)
+		configInfo.lensControls = lens->controls();
+
 	configInfo.sensorInfo = sensorInfo;
 	configInfo.bdsOutputSize = config->imguConfig().bds;
 	configInfo.iif = config->imguConfig().iif;