| Message ID | 20251024085130.995967-3-stefan.klug@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting Stefan Klug (2025-10-24 17:50:26) > In unstable systems it can happen, that some sequence numbers are missed > in the IPA. Gracefully handle that situation by queuing no-ops. > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> > --- > src/libcamera/delayed_controls.cpp | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp > index 246e7cefa4e5..e5bdc374fd0e 100644 > --- a/src/libcamera/delayed_controls.cpp > +++ b/src/libcamera/delayed_controls.cpp > @@ -178,6 +178,15 @@ bool DelayedControls::push(uint32_t sequence, const ControlList &controls) > << " current queue index: " << queueCount_; > } > > + while (sequence > queueCount_) { > + LOG(DelayedControls, Warning) > + << "Missed push for sequence " << queueCount_ > + << " Auto queue no-op."; > + push(queueCount_, {}); > + } > + > + ASSERT(sequence == queueCount_); > + > /* Copy state from previous frame. */ > for (auto &ctrl : values_) { > Info &info = ctrl.second[queueCount_]; > -- > 2.48.1 >
diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp index 246e7cefa4e5..e5bdc374fd0e 100644 --- a/src/libcamera/delayed_controls.cpp +++ b/src/libcamera/delayed_controls.cpp @@ -178,6 +178,15 @@ bool DelayedControls::push(uint32_t sequence, const ControlList &controls) << " current queue index: " << queueCount_; } + while (sequence > queueCount_) { + LOG(DelayedControls, Warning) + << "Missed push for sequence " << queueCount_ + << " Auto queue no-op."; + push(queueCount_, {}); + } + + ASSERT(sequence == queueCount_); + /* Copy state from previous frame. */ for (auto &ctrl : values_) { Info &info = ctrl.second[queueCount_];
In unstable systems it can happen, that some sequence numbers are missed in the IPA. Gracefully handle that situation by queuing no-ops. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- src/libcamera/delayed_controls.cpp | 9 +++++++++ 1 file changed, 9 insertions(+)