summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ipa/raspberrypi/raspberrypi.cpp12
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp5
2 files changed, 16 insertions, 1 deletions
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 29d48b1b..5824d3b5 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -197,8 +197,11 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,
const IPAOperationData &ipaConfig,
IPAOperationData *result)
{
- if (entityControls.empty())
+ if (entityControls.size() != 2) {
+ LOG(IPARPI, Error) << "No ISP or sensor controls found.";
+ result->operation = RPi::IPA_CONFIG_FAILED;
return;
+ }
result->operation = 0;
@@ -217,6 +220,13 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,
if (!helper_) {
helper_ = std::unique_ptr<RPiController::CamHelper>(RPiController::CamHelper::Create(cameraName));
+ if (!helper_) {
+ LOG(IPARPI, Error) << "Could not create camera helper for "
+ << cameraName;
+ result->operation = RPi::IPA_CONFIG_FAILED;
+ return;
+ }
+
/*
* Pass out the sensor config to the pipeline handler in order
* to setup the staggered writer class.
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 6fcdf557..76252806 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -1194,6 +1194,11 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)
ipa_->configure(sensorInfo_, streamConfig, entityControls, ipaConfig,
&result);
+ if (result.operation & RPi::IPA_CONFIG_FAILED) {
+ LOG(RPI, Error) << "IPA configuration failed!";
+ return -EPIPE;
+ }
+
unsigned int resultIdx = 0;
if (result.operation & RPi::IPA_CONFIG_STAGGERED_WRITE) {
/*