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

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

Commit Message

Naushir Patuck Aug. 4, 2020, 9:58 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>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: David Plowman <david.plowman@raspberrypi.com>
---
 src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index d4791a16..0c8e352d 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -983,12 +983,13 @@  int RPiCameraData::configureIPA()
 	unsigned int i = 0;
 	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());