[libcamera-devel,v3,07/10] libcamera: pipeline: raspberrypi: Fix bug in passing configuration to IPA

Message ID 20200717085410.732308-8-naush@raspberrypi.com
State Superseded
Headers show
Series
  • Zero-copy RAW stream work
Related show

Commit Message

Naushir Patuck July 17, 2020, 8:54 a.m. UTC
The counter was not incremented, so multiple streams would only pass the
last stream config to the IPA.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index f63bf497..ce56ad1a 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -988,14 +988,14 @@  int RPiCameraData::configureIPA()
 	unicam_[Unicam::Image].dev()->getFormat(&sensorFormat);
 	/* Inform IPA of stream configuration and sensor controls. */
 	unsigned int i = 0;
-	for (auto const &stream : isp_) {
+	for (auto const &stream : isp_)
 		if (stream.isExternal()) {
-			streamConfig[i] = {
+			streamConfig[i++] = {
 				.pixelFormat = stream.configuration().pixelFormat,
 				.size = stream.configuration().size
 			};
 		}
-	}
+
 	entityControls.emplace(0, unicam_[Unicam::Image].dev()->controls());
 	entityControls.emplace(1, isp_[Isp::Input].dev()->controls());