[libcamera-devel] [PATCH v5 05/19] libcamera: ipu3: Make sure the config is valid
Jacopo Mondi
jacopo at jmondi.org
Fri Jul 31 17:33:06 CEST 2020
Inspect the return status of validate() in the IPU3 pipeline handler
generateConfigurtion() implementation. If the generated configuration is
not valid, return a an empty configuration to the application.
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/libcamera/pipeline/ipu3/ipu3.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index b1f804d60664..f2d76551d369 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -363,7 +363,8 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,
config->addConfiguration(cfg);
}
- config->validate();
+ if (config->validate() == CameraConfiguration::Invalid)
+ return {};
return config;
}
--
2.27.0
More information about the libcamera-devel
mailing list