[libcamera-devel,v5,6/9] libcamera: ipa: Add lens control member to ipu3 ipa interface
diff mbox series

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

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

	- None

Changes since v4:

	- None

Changes in v3:

	- None

 include/libcamera/ipa/ipu3.mojom | 1 +
 src/ipa/ipu3/ipu3.cpp            | 3 +++
 2 files changed, 4 insertions(+)

Comments

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

Thanks for the patch !

On 04/03/2022 00:49, Daniel Scally wrote:
> Add further members to the ipu3 ipa interface that will hold lens
> controls passed in by 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 since v4:
> 
> 	- None
> 
> Changes in v3:
> 
> 	- None
> 
>   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 b5149bcd..008f93a7 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -163,6 +163,7 @@ private:
>   	std::map<unsigned int, MappedFrameBuffer> buffers_;
>   
>   	ControlInfoMap ctrls_;
> +	ControlInfoMap lensCtrls_;
>   
>   	IPACameraSensorInfo sensorInfo_;
>   
> @@ -450,6 +451,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 b5149bcd..008f93a7 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -163,6 +163,7 @@  private:
 	std::map<unsigned int, MappedFrameBuffer> buffers_;
 
 	ControlInfoMap ctrls_;
+	ControlInfoMap lensCtrls_;
 
 	IPACameraSensorInfo sensorInfo_;
 
@@ -450,6 +451,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.