From patchwork Sun Jun 16 16:38:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20329 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 31E3CC3293 for ; Sun, 16 Jun 2024 16:39:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 51B1F65489; Sun, 16 Jun 2024 18:39:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="O87Kl/UN"; 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 16B0D65456 for ; Sun, 16 Jun 2024 18:39:33 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BDFC7581 for ; Sun, 16 Jun 2024 18:39:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718555956; bh=iR8y/Opgedt1TxZ6K4koPl5aVQAl8MKbwjL3MeBy+8I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=O87Kl/UNl6WvFvPadfktVkFyOFyAF1IWn1RxA6HapNmE8iBeRYxERlF8GM7WhTUIl IUf5O/LCUlJcQ9agXXWxbYpilhmKSXZTmQrwwFRwPoDJjg0Z2kqJBZa1I7OrBZM70H gwYyisUTY0Z1tQP/aDycdyPmvSjJ2RwFicVtugiI= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 01/12] ipa: rkisp1: agc: Fix initialization without metering modes Date: Sun, 16 Jun 2024 19:38:59 +0300 Message-ID: <20240616163910.5506-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240616163910.5506-1-laurent.pinchart@ideasonboard.com> References: <20240616163910.5506-1-laurent.pinchart@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" When no metering modes are specified in the tuning file, the AGC initialzation fails with [0:00:46.148508875] [209] ERROR RkISP1Agc agc.cpp:46 'AeMeteringMode' parameter not found in tuning file which results in a camera initialization failure. Fix it by downgrading the error into a warning, and continuing the AGC initialization with the default metering mode. Fixes: 35233938ee5d ("ipa: rkisp1: agc: Read histogram weights from tuning file") Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- src/ipa/rkisp1/algorithms/agc.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp index 8702145187c7..0f60d08fd41c 100644 --- a/src/ipa/rkisp1/algorithms/agc.cpp +++ b/src/ipa/rkisp1/algorithms/agc.cpp @@ -42,11 +42,9 @@ LOG_DEFINE_CATEGORY(RkISP1Agc) int Agc::parseMeteringModes(IPAContext &context, const YamlObject &tuningData) { - if (!tuningData.isDictionary()) { - LOG(RkISP1Agc, Error) + if (!tuningData.isDictionary()) + LOG(RkISP1Agc, Warning) << "'AeMeteringMode' parameter not found in tuning file"; - return -EINVAL; - } for (const auto &[key, value] : tuningData.asDict()) { if (controls::AeMeteringModeNameValueMap.find(key) ==