summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2020-05-29 08:16:46 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-06-04 09:32:54 +0100
commit5dfd2bfc0dff958394bf08de104384c56a65f626 (patch)
tree2034259cbabb6ab3581371e0802547716df48495 /src
parent1a77984c892d186859ba699dc9e6a23beb7b739a (diff)
pipeline: raspberrypi: Fix for staggered write on reset
The reset function in staggered write was using the wrong index when looking for the last updated camera parameters. This would cause possibly stale exposure values to be written to the camera on a mode switch for captures. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/raspberrypi/staggered_ctrl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/staggered_ctrl.cpp b/src/libcamera/pipeline/raspberrypi/staggered_ctrl.cpp
index 391e13f5..5ed63a8e 100644
--- a/src/libcamera/pipeline/raspberrypi/staggered_ctrl.cpp
+++ b/src/libcamera/pipeline/raspberrypi/staggered_ctrl.cpp
@@ -46,7 +46,7 @@ void StaggeredCtrl::reset()
{
std::lock_guard<std::mutex> lock(lock_);
- int lastSetCount = std::max<int>(0, setCount_ - 1);
+ int lastSetCount = setCount_;
std::unordered_map<uint32_t, int32_t> lastVal;
/* Reset the counters. */