From patchwork Fri Oct 11 09:22:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 21587 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 A827CC3260 for ; Fri, 11 Oct 2024 09:22:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CF69C65375; Fri, 11 Oct 2024 11:22:40 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Y/+N9dfZ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 157366536C for ; Fri, 11 Oct 2024 11:22:37 +0200 (CEST) Received: from umang.jain (unknown [IPv6:2405:201:2015:f873:55d7:c02e:b2eb:ee3f]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7C6CDCDB; Fri, 11 Oct 2024 11:20:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1728638458; bh=xW2uqmk5kvlornICxBmL4hpFoKO9QCloAsflcEgzTVA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y/+N9dfZ6fDpMdtpNoGzvnr1d7cNuKoe6XrM8twaV1IL12Yd8EhQfE14m3T7bh0b0 D95hgPTYSgpKsZpDnFI2q+Jhd1HZzG9wpndTaJHUtHlIk3Mfbj42a1r1JJLeokffQw ae8oHz44ViN0ri1c7UU3KRmpMKQezUH3n8NXdiaY= From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , Stefan Klug , Umang Jain Subject: [PATCH 1/3] libcamera: rkisp1: Use const reference for sensor configuration Date: Fri, 11 Oct 2024 14:52:20 +0530 Message-ID: <20241011092222.537322-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241011092222.537322-1-umang.jain@ideasonboard.com> References: <20241011092222.537322-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 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" User-provided sensor configuration is never meant to be altered, hence pass SensorConfiguration by `const` reference in RkISP1Path::validate(). Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham Reviewed-by: Stefan Klug --- src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 2 +- src/libcamera/pipeline/rkisp1/rkisp1_path.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp index 1999094e..4a3b779c 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp @@ -253,7 +253,7 @@ RkISP1Path::generateConfiguration(const CameraSensor *sensor, const Size &size, CameraConfiguration::Status RkISP1Path::validate(const CameraSensor *sensor, - std::optional &sensorConfig, + const std::optional &sensorConfig, StreamConfiguration *cfg) { const std::vector &mbusCodes = sensor->mbusCodes(); diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h index ce9a5666..8461071f 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h @@ -45,7 +45,7 @@ public: const Size &resolution, StreamRole role); CameraConfiguration::Status validate(const CameraSensor *sensor, - std::optional &sensorConfig, + const std::optional &sensorConfig, StreamConfiguration *cfg); int configure(const StreamConfiguration &config,