[libcamera-devel,v3,11/17] ipa: rkisp1: Make cameraSensorInfo mandatory
diff mbox series

Message ID 20220818094410.1671-12-jacopo@jmondi.org
State New
Headers show
Series
  • libcamera: Align IPU3 and RKISP1 interfaces
Related show

Commit Message

Jacopo Mondi Aug. 18, 2022, 9:44 a.m. UTC
Resolve a long-standing todo item by making the cameraSensorInfo
mandatory to operate the RkISP1 IPA module.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/ipa/rkisp1/rkisp1.cpp                | 6 ------
 src/libcamera/pipeline/rkisp1/rkisp1.cpp | 6 ++----
 2 files changed, 2 insertions(+), 10 deletions(-)

Patch
diff mbox series

diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index f2075c893d29..9f97c776016e 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -256,12 +256,6 @@  bool IPARkISP1::validateSensorControls(const ControlInfoMap &sensorControls)
 
 }
 
-/**
- * \todo The RkISP1 pipeline currently provides an empty IPACameraSensorInfo
- * if the connected sensor does not provide enough information to properly
- * assemble one. Make sure the reported sensor information are relevant
- * before accessing them.
- */
 int IPARkISP1::configure(const IPAConfigInfo &configInfo)
 {
 	if (!validateSensorControls(configInfo.sensorControls)) {
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 3b250b0ae346..f9a3722e4084 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -681,10 +681,8 @@  int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
 	IPACameraSensorInfo sensorInfo = {};
 	ret = data->sensor_->sensorInfo(&sensorInfo);
 	if (ret) {
-		/* \todo Turn this into a hard failure. */
-		LOG(RkISP1, Warning) << "Camera sensor information not available";
-		sensorInfo = {};
-		ret = 0;
+		LOG(RkISP1, Error) << "Camera sensor information not available";
+		return ret;
 	}
 
 	configInfo.sensorInfo = sensorInfo;