From patchwork Wed Jul 1 12:30:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 8531 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0758CBF415 for ; Wed, 1 Jul 2020 12:27:24 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 85D2260CB2; Wed, 1 Jul 2020 14:27:22 +0200 (CEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C1F5F60C53 for ; Wed, 1 Jul 2020 14:27:21 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 683E51C0019; Wed, 1 Jul 2020 12:27:21 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Wed, 1 Jul 2020 14:30:25 +0200 Message-Id: <20200701123036.51922-5-jacopo@jmondi.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200701123036.51922-1-jacopo@jmondi.org> References: <20200701123036.51922-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 04/15] libcamera: ipu3: Do not overwrite StreamConfiguration X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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. Signed-off-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/pipeline/ipu3/ipu3.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.27.0 diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 97fc8b60c3cb..cd18c6f31023 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -264,7 +264,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);