[v1,20/35] libcamera: delayed_controls: Ignore double pushes for the same frame number
diff mbox series

Message ID 20251024085130.995967-21-stefan.klug@ideasonboard.com
State New
Headers show
Series
  • rkisp1: pipeline rework for PFC
Related show

Commit Message

Stefan Klug Oct. 24, 2025, 8:50 a.m. UTC
For successful PFC a single sequence must only be pushed once to delayed
controls. Such a situation can occur if no-ops were pushed in delayed
controls due to a buffer underrun.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
---
 src/libcamera/delayed_controls.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp
index 8239f3dcf347..3dead0dc4429 100644
--- a/src/libcamera/delayed_controls.cpp
+++ b/src/libcamera/delayed_controls.cpp
@@ -176,6 +176,8 @@  bool DelayedControls::push(uint32_t sequence, const ControlList &controls)
 		LOG(DelayedControls, Warning)
 			<< "Double push for sequence " << sequence
 			<< " current queue index: " << queueCount_;
+		LOG(DelayedControls, Warning) << "ignore silently";
+		return true;
 	}
 
 	while (sequence > queueCount_) {
@@ -278,7 +280,11 @@  ControlList DelayedControls::get(uint32_t sequence)
  */
 void DelayedControls::applyControls(uint32_t sequence)
 {
-	LOG(DelayedControls, Debug) << "frame " << sequence << " started";
+	LOG(DelayedControls, Debug)
+		<< "Apply controls for: " << sequence
+		<< " expected: " << writeCount_
+		<< " (instant controls for frame "
+		<< (sequence - maxDelay_) << ")";
 
 	while (queueCount_ - 1 < sequence) {
 		LOG(DelayedControls, Warning)