summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-03-26 14:47:22 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-04-14 00:28:28 +0200
commit6d7a66dc4eb1a406010733aed63a2a3d37ce7508 (patch)
tree815ce26b2c85aff34aa635325da34516c9f5d315 /src
parent871d182cef052f0fbf026a73cc24fe2f4dbd5974 (diff)
libcamera: pipeline: rkisp1: Call IPA start() and stop()
Call the IPA start()/stop() functions before/after the camera is started. This makes sure the IPA functions properly once thread management is moved into the start/stop interface. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 47edf1dc..f4226436 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -779,10 +779,19 @@ int PipelineHandlerRkISP1::start(Camera *camera)
if (ret)
return ret;
+ ret = data->ipa_->start();
+ if (ret) {
+ freeBuffers(camera);
+ LOG(RkISP1, Error)
+ << "Failed to start IPA " << camera->name();
+ return ret;
+ }
+
data->frame_ = 0;
ret = param_->streamOn();
if (ret) {
+ data->ipa_->stop();
freeBuffers(camera);
LOG(RkISP1, Error)
<< "Failed to start parameters " << camera->name();
@@ -792,6 +801,7 @@ int PipelineHandlerRkISP1::start(Camera *camera)
ret = stat_->streamOn();
if (ret) {
param_->streamOff();
+ data->ipa_->stop();
freeBuffers(camera);
LOG(RkISP1, Error)
<< "Failed to start statistics " << camera->name();
@@ -802,6 +812,7 @@ int PipelineHandlerRkISP1::start(Camera *camera)
if (ret) {
param_->streamOff();
stat_->streamOff();
+ data->ipa_->stop();
freeBuffers(camera);
LOG(RkISP1, Error)
@@ -845,6 +856,8 @@ void PipelineHandlerRkISP1::stop(Camera *camera)
LOG(RkISP1, Warning)
<< "Failed to stop parameters " << camera->name();
+ data->ipa_->stop();
+
data->timeline_.reset();
data->frameInfo_.clear();