[v2,33/35] pipeline: rkisp1: Add warning to unclear format handling
diff mbox series

Message ID 20251023144841.403689-34-stefan.klug@ideasonboard.com
State New
Headers show
Series
  • Full dewarper support on imx8mp
Related show

Commit Message

Stefan Klug Oct. 23, 2025, 2:48 p.m. UTC
It is not mentioned when the sensorFormat is allowed to have zero size.
Add a warning and todo to that case but leave it in place for now.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
---
 src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index da3cfc0ffdeb..9a156d4a01f2 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -782,8 +782,16 @@  CameraConfiguration::Status RkISP1CameraConfiguration::validate()
 	sensorFormat_ = sensor->getFormat(mbusCodes, accumulatedSensorSize,
 					  mainPath->maxResolution());
 
-	if (sensorFormat_.size.isNull())
+	if (sensorFormat_.size.isNull()) {
+		/*
+		 * \todo When can this happen? Should we return a failure in
+		 * this case?
+		 */
 		sensorFormat_.size = sensor->resolution();
+		LOG(RkISP1, Warning)
+			<< "Failed to select sensor format. Default to "
+			<< sensorFormat_;
+	}
 
 	return status;
 }