From a2be725d2652ba71d23adf36bb8a1342947debbf Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Fri, 11 Oct 2024 14:52:21 +0530 Subject: libcamera: rkisp1: Rectify SensorConfiguration check The 'found' flag was mistakenly understood that a compatible sensor format has been found when a sensor configuration is passed in. However, 'found' related to the stream configuration's pixelformat, whether it is supported by the RkISP1Path video node or not. It does not relate to the sensor format, hence the check: if (sensorConfig && !found) doesn't make sense. Rectify the above check with: if (sensorConfig && !rawFormat.isValid()) to ensure a sensor format compatible with sensor configuration has been set to rawFormat. Fixes: 047d647452c4 ("libcamera: rkisp1: Integrate SensorConfiguration support") Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp index 4a3b779c..236d05af 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp @@ -304,7 +304,7 @@ RkISP1Path::validate(const CameraSensor *sensor, } } - if (sensorConfig && !found) + if (sensorConfig && !rawFormat.isValid()) return CameraConfiguration::Invalid; bool isRaw = PixelFormatInfo::info(cfg->pixelFormat).colourEncoding == -- cgit v1.2.1