[libcamera-devel] [PATCH v3 5/7] libcamera: pipeline: rkisp1: Call IPA start() and stop()
Niklas Söderlund
niklas.soderlund at ragnatech.se
Sat Apr 11 02:19:09 CEST 2020
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 at ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/libcamera/pipeline/rkisp1/rkisp1.cpp | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index daf84b5ac129efc8..118b29f0df64a003 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -764,10 +764,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();
@@ -777,6 +786,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();
@@ -787,6 +797,7 @@ int PipelineHandlerRkISP1::start(Camera *camera)
if (ret) {
param_->streamOff();
stat_->streamOff();
+ data->ipa_->stop();
freeBuffers(camera);
LOG(RkISP1, Error)
@@ -830,6 +841,8 @@ void PipelineHandlerRkISP1::stop(Camera *camera)
LOG(RkISP1, Warning)
<< "Failed to stop parameters " << camera->name();
+ data->ipa_->stop();
+
data->timeline_.reset();
freeBuffers(camera);
--
2.26.0
More information about the libcamera-devel
mailing list