From patchwork Thu Aug 18 09:44:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 17166 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 31F40C3272 for ; Thu, 18 Aug 2022 09:44:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CE57261FDF; Thu, 18 Aug 2022 11:44:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1660815878; bh=nAUb8Asw6OSl/SzxQBTVubUhqHDEbKyLYas21dGVrnI=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=xFWltJum8zHkusoecA4YomYwX3OnIPI7hG3Pv1BLHtt5oSEUgtdkEQCP7lhz1vurw 12JFPY0P6Ds2tshE5eJSOBbf7YXnPejsyw78ijsMhbnHhNhSoywUhfTZ14paEa+U/4 QcycmOj+oIqZg/hxJ4W/y/XScYtcfeemj0mi+UoAy7RYq0KKZbPZgNCKlQlu6j7fov nWxjgsqSY6wjX1MtLV382iJxB1ukn0XW4AGP7GVzaHB6PWDFgxC15TbhrAG6WCleAv xLSBOL1esuNJwul87vXw7K11dnlqxCUfCCG0R3rvrqIw3R34UKIVKSj/aBs+t+VPKj uizOn25ZFgUng== Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 00BD161FC9 for ; Thu, 18 Aug 2022 11:44:33 +0200 (CEST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id F2F5BFF808; Thu, 18 Aug 2022 09:44:32 +0000 (UTC) To: libcamera-devel@lists.libcamera.org Date: Thu, 18 Aug 2022 11:44:04 +0200 Message-Id: <20220818094410.1671-12-jacopo@jmondi.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220818094410.1671-1-jacopo@jmondi.org> References: <20220818094410.1671-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 11/17] ipa: rkisp1: Make cameraSensorInfo mandatory 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: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Resolve a long-standing todo item by making the cameraSensorInfo mandatory to operate the RkISP1 IPA module. Signed-off-by: Jacopo Mondi --- src/ipa/rkisp1/rkisp1.cpp | 6 ------ src/libcamera/pipeline/rkisp1/rkisp1.cpp | 6 ++---- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index f2075c893d29..9f97c776016e 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -256,12 +256,6 @@ bool IPARkISP1::validateSensorControls(const ControlInfoMap &sensorControls) } -/** - * \todo The RkISP1 pipeline currently provides an empty IPACameraSensorInfo - * if the connected sensor does not provide enough information to properly - * assemble one. Make sure the reported sensor information are relevant - * before accessing them. - */ int IPARkISP1::configure(const IPAConfigInfo &configInfo) { if (!validateSensorControls(configInfo.sensorControls)) { diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 3b250b0ae346..f9a3722e4084 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -681,10 +681,8 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c) IPACameraSensorInfo sensorInfo = {}; ret = data->sensor_->sensorInfo(&sensorInfo); if (ret) { - /* \todo Turn this into a hard failure. */ - LOG(RkISP1, Warning) << "Camera sensor information not available"; - sensorInfo = {}; - ret = 0; + LOG(RkISP1, Error) << "Camera sensor information not available"; + return ret; } configInfo.sensorInfo = sensorInfo;