From 5dfd2bfc0dff958394bf08de104384c56a65f626 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Fri, 29 May 2020 08:16:46 +0100 Subject: 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 Signed-off-by: David Plowman Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- src/libcamera/pipeline/raspberrypi/staggered_ctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 lock(lock_); - int lastSetCount = std::max(0, setCount_ - 1); + int lastSetCount = setCount_; std::unordered_map lastVal; /* Reset the counters. */ -- cgit v1.2.1