[libcamera-devel,v3,1/4] pipeline: ipa: raspberrypi: Fix pipeline running on in a stopped state
diff mbox series

Message ID 20210218124824.1825418-2-naush@raspberrypi.com
State Accepted
Commit a13d229086d73bcde4c0204d359e2352de4fdbdf
Headers show
Series
  • Updates after IPAInterface changes
Related show

Commit Message

Naushir Patuck Feb. 18, 2021, 12:48 p.m. UTC
With the recent IPAInterface changes, the signal handlers
statsMetadataComplete(), runISP() and embeddedComplete() would run
unconditionally when called. They should only run when state != Stopped.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Fixes: e201cb4f5450 ("libcamera: IPAInterface: Replace C API with the new C++-only API")
Tested-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 15aa600ed581..75d57c2a2ffd 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -1281,7 +1281,7 @@  int RPiCameraData::configureIPA(const CameraConfiguration *config)
 void RPiCameraData::statsMetadataComplete(uint32_t bufferId, const ControlList &controls)
 {
 	if (state_ == State::Stopped)
-		handleState();
+		return;
 
 	FrameBuffer *buffer = isp_[Isp::Stats].getBuffers().at(bufferId);
 
@@ -1314,7 +1314,7 @@  void RPiCameraData::statsMetadataComplete(uint32_t bufferId, const ControlList &
 void RPiCameraData::runIsp(uint32_t bufferId)
 {
 	if (state_ == State::Stopped)
-		handleState();
+		return;
 
 	FrameBuffer *buffer = unicam_[Unicam::Image].getBuffers().at(bufferId);
 
@@ -1329,7 +1329,7 @@  void RPiCameraData::runIsp(uint32_t bufferId)
 void RPiCameraData::embeddedComplete(uint32_t bufferId)
 {
 	if (state_ == State::Stopped)
-		handleState();
+		return;
 
 	FrameBuffer *buffer = unicam_[Unicam::Embedded].getBuffers().at(bufferId);
 	handleStreamBuffer(buffer, &unicam_[Unicam::Embedded]);