[RFC,5/7] ipa: softipa: Pass IPACameraSensorInfo to configure
diff mbox series

Message ID 20251011160335.50578-6-kieran.bingham@ideasonboard.com
State New
Headers show
Series
  • Preparatory cleanup for libipa rework.
Related show

Commit Message

Kieran Bingham Oct. 11, 2025, 4:03 p.m. UTC
Pass the CameraSensorInfo in to the configure phase of the IPA from the
CameraSensor class, allowing the context to be used when configuring the
IPA.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 include/libcamera/ipa/soft.mojom         |  1 +
 src/libcamera/pipeline/simple/simple.cpp | 10 ++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom
index 3acac53981e7..7bdbb65b4458 100644
--- a/include/libcamera/ipa/soft.mojom
+++ b/include/libcamera/ipa/soft.mojom
@@ -9,6 +9,7 @@  module ipa.soft;
 import "include/libcamera/ipa/core.mojom";
 
 struct IPAConfigInfo {
+	libcamera.IPACameraSensorInfo sensorInfo;
 	libcamera.ControlInfoMap sensorControls;
 };
 
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index a7e7ac25bac2..7d56effec50b 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -1412,8 +1412,14 @@  int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)
 	if (data->converter_) {
 		return data->converter_->configure(inputCfg, outputCfgs);
 	} else {
-		ipa::soft::IPAConfigInfo configInfo;
-		configInfo.sensorControls = data->sensor_->controls();
+		IPACameraSensorInfo sensorInfo;
+		ret = data->sensor_->sensorInfo(&sensorInfo);
+		if (ret)
+			return ret;
+
+		ipa::soft::IPAConfigInfo configInfo{ sensorInfo,
+						     data->sensor_->controls() };
+
 		return data->swIsp_->configure(inputCfg, outputCfgs, configInfo, &data->controlInfo_);
 	}
 }