From 3424fef3a5500dfb3a0b2815ce9824316636a131 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Mon, 29 Jun 2020 18:32:22 +0200 Subject: libcamera: ipu3: Do not overwrite StreamConfiguration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The validate function overwrites the generated StreamConfiguration with the one reported by the CIO2 unit when inspecting the RAW stream configuration. As we prepare to add StreamFormats to the IPU3 StreamConfiguration, assigning to the CIO2 generated configuration would delete the StreamFormats. Fix this by updating relevant fields only in order to keep the assigned StreamFormats. Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Jacopo Mondi --- src/libcamera/pipeline/ipu3/ipu3.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index f2d76551..b998c072 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -270,7 +270,9 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate() const Stream *stream = streams_[i]; if (stream == &data_->rawStream_) { - cfg = cio2Configuration_; + cfg.size = cio2Configuration_.size; + cfg.pixelFormat = cio2Configuration_.pixelFormat; + cfg.bufferCount = cio2Configuration_.bufferCount; } else { bool scale = stream == &data_->vfStream_; adjustStream(config_[i], scale); -- cgit v1.2.1