ipa: rpi: Advance the delay context counter even when IPAs don't run

The delay context counter must be advanced even when we decide not to
run prepare/process. Otherwise, when we skip them at higher
framerates, the current IPA context counter will catch up and
overwrite the delay context.

It's safe to advance the counter because the metadata is always copied
forward a slot when we decide not to run the IPAs.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
David Plowman
2025-07-21 08:47:24 +01:00
committed by Kieran Bingham
parent 4b5541b086
commit 56f8f6b409
+8 -9
View File
@@ -501,10 +501,9 @@ void IpaBase::prepareIsp(const PrepareParams &params)
void IpaBase::processStats(const ProcessParams &params)
{
unsigned int ipaContext = params.ipaContext % rpiMetadata_.size();
RPiController::Metadata &rpiMetadata = rpiMetadata_[ipaContext];
if (processPending_ && frameCount_ >= mistrustCount_) {
RPiController::Metadata &rpiMetadata = rpiMetadata_[ipaContext];
auto it = buffers_.find(params.buffers.stats);
if (it == buffers_.end()) {
LOG(IPARPI, Error) << "Could not find stats buffer!";
@@ -518,14 +517,14 @@ void IpaBase::processStats(const ProcessParams &params)
helper_->process(statistics, rpiMetadata);
controller_.process(statistics, &rpiMetadata);
}
struct AgcStatus agcStatus;
if (rpiMetadata.get("agc.status", agcStatus) == 0) {
ControlList ctrls(sensorCtrls_);
applyAGC(&agcStatus, ctrls);
setDelayedControls.emit(ctrls, ipaContext);
setCameraTimeoutValue();
}
struct AgcStatus agcStatus;
if (rpiMetadata.get("agc.status", agcStatus) == 0) {
ControlList ctrls(sensorCtrls_);
applyAGC(&agcStatus, ctrls);
setDelayedControls.emit(ctrls, ipaContext);
setCameraTimeoutValue();
}
/*