[libcamera-devel,v5,8/9] libcamera: ipu3: Pass lens controls to config info
diff mbox series

Message ID 20220303234956.1463551-9-djrscally@gmail.com
State Accepted
Headers show
Series
  • Enumerate CameraLens by following sensor's ancillary links
Related show

Commit Message

Daniel Scally March 3, 2022, 11:49 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

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
---
Changes in v5:

	- None

Changes in v4:

	- None

Changes in v3:

	- None

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

Comments

Nicolas Dufresne via libcamera-devel March 9, 2022, 3:16 p.m. UTC | #1
Hi !

Thanks for the patch !

On 04/03/2022 00:49, 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
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Daniel Scally <djrscally@gmail.com>

Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>

> ---
> Changes in v5:
> 
> 	- None
> 
> Changes in v4:
> 
> 	- None
> 
> Changes in v3:
> 
> 	- None
> 
>   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 6c5617cd..b3199aec 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -660,6 +660,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 6c5617cd..b3199aec 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -660,6 +660,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;