[libcamera-devel,v2,5/7] libcamera: ipa: Add lens control member to ipu3 ipa interface
diff mbox series

Message ID 20211203224230.38700-6-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
Add further members to the ipu3 ipa interface that will hold lens
controls passed in by configInfo

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

	- New patch

 include/libcamera/ipa/ipu3.mojom | 1 +
 src/ipa/ipu3/ipu3.cpp            | 3 +++
 2 files changed, 4 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:28PM +0000, Daniel Scally wrote:
> Add further members to the ipu3 ipa interface that will hold lens
> controls passed in by configInfo
> 
> Signed-off-by: Daniel Scally <djrscally@gmail.com>
> ---
> Changes in v2:
> 
> 	- New patch
> 
>  include/libcamera/ipa/ipu3.mojom | 1 +
>  src/ipa/ipu3/ipu3.cpp            | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/include/libcamera/ipa/ipu3.mojom b/include/libcamera/ipa/ipu3.mojom
> index cc0d822f..18cdc744 100644
> --- a/include/libcamera/ipa/ipu3.mojom
> +++ b/include/libcamera/ipa/ipu3.mojom
> @@ -37,6 +37,7 @@ struct IPU3Action {
>  struct IPAConfigInfo {
>  	libcamera.IPACameraSensorInfo sensorInfo;
>  	libcamera.ControlInfoMap sensorControls;
> +	libcamera.ControlInfoMap lensControls;
>  	libcamera.Size bdsOutputSize;
>  	libcamera.Size iif;
>  };
> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> index b7b48d9a..3828650d 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -162,6 +162,7 @@ private:
>  	std::map<unsigned int, MappedFrameBuffer> buffers_;
>  
>  	ControlInfoMap ctrls_;

It could be useful to rename this to sensorCtrls_ (in a separate patch).

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

> +	ControlInfoMap lensCtrls_;
>  
>  	IPACameraSensorInfo sensorInfo_;
>  
> @@ -422,6 +423,8 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo,
>  
>  	sensorInfo_ = configInfo.sensorInfo;
>  
> +	lensCtrls_ = configInfo.lensControls;
> +
>  	/*
>  	 * Compute the sensor V4L2 controls to be used by the algorithms and
>  	 * to be set on the sensor.

Patch
diff mbox series

diff --git a/include/libcamera/ipa/ipu3.mojom b/include/libcamera/ipa/ipu3.mojom
index cc0d822f..18cdc744 100644
--- a/include/libcamera/ipa/ipu3.mojom
+++ b/include/libcamera/ipa/ipu3.mojom
@@ -37,6 +37,7 @@  struct IPU3Action {
 struct IPAConfigInfo {
 	libcamera.IPACameraSensorInfo sensorInfo;
 	libcamera.ControlInfoMap sensorControls;
+	libcamera.ControlInfoMap lensControls;
 	libcamera.Size bdsOutputSize;
 	libcamera.Size iif;
 };
diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index b7b48d9a..3828650d 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -162,6 +162,7 @@  private:
 	std::map<unsigned int, MappedFrameBuffer> buffers_;
 
 	ControlInfoMap ctrls_;
+	ControlInfoMap lensCtrls_;
 
 	IPACameraSensorInfo sensorInfo_;
 
@@ -422,6 +423,8 @@  int IPAIPU3::configure(const IPAConfigInfo &configInfo,
 
 	sensorInfo_ = configInfo.sensorInfo;
 
+	lensCtrls_ = configInfo.lensControls;
+
 	/*
 	 * Compute the sensor V4L2 controls to be used by the algorithms and
 	 * to be set on the sensor.