libcamera: pipeline: vimc: 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>
This commit is contained in:
Niklas Söderlund 2020-03-26 14:53:31 +01:00
parent 6d7a66dc4e
commit 7b66e5f76d

View file

@ -274,8 +274,15 @@ int PipelineHandlerVimc::start(Camera *camera)
if (ret < 0)
return ret;
ret = data->ipa_->start();
if (ret) {
data->video_->releaseBuffers();
return ret;
}
ret = data->video_->streamOn();
if (ret < 0) {
data->ipa_->stop();
data->video_->releaseBuffers();
return ret;
}
@ -287,6 +294,7 @@ void PipelineHandlerVimc::stop(Camera *camera)
{
VimcCameraData *data = cameraData(camera);
data->video_->streamOff();
data->ipa_->stop();
data->video_->releaseBuffers();
}