[{"id":29971,"web_url":"https://patchwork.libcamera.org/comment/29971/","msgid":"<171861465646.2248009.8134780494180387782@ping.linuxembedded.co.uk>","date":"2024-06-17T08:57:36","subject":"Re: [PATCH 01/12] ipa: rkisp1: agc: Fix initialization without\n\tmetering modes","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2024-06-16 17:38:59)\n> When no metering modes are specified in the tuning file, the AGC\n> initialzation fails with\n> \n> [0:00:46.148508875] [209] ERROR RkISP1Agc agc.cpp:46 'AeMeteringMode' parameter not found in tuning file\n> \n> which results in a camera initialization failure. Fix it by downgrading\n> the error into a warning, and continuing the AGC initialization with the\n> default metering mode.\n> \n> Fixes: 35233938ee5d (\"ipa: rkisp1: agc: Read histogram weights from tuning file\")\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/ipa/rkisp1/algorithms/agc.cpp | 6 ++----\n>  1 file changed, 2 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\n> index 8702145187c7..0f60d08fd41c 100644\n> --- a/src/ipa/rkisp1/algorithms/agc.cpp\n> +++ b/src/ipa/rkisp1/algorithms/agc.cpp\n> @@ -42,11 +42,9 @@ LOG_DEFINE_CATEGORY(RkISP1Agc)\n>  \n>  int Agc::parseMeteringModes(IPAContext &context, const YamlObject &tuningData)\n>  {\n> -       if (!tuningData.isDictionary()) {\n> -               LOG(RkISP1Agc, Error)\n> +       if (!tuningData.isDictionary())\n> +               LOG(RkISP1Agc, Warning)\n>                         << \"'AeMeteringMode' parameter not found in tuning file\";\n> -               return -EINVAL;\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> -       }\n>  \n>         for (const auto &[key, value] : tuningData.asDict()) {\n>                 if (controls::AeMeteringModeNameValueMap.find(key) ==\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3E316C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 17 Jun 2024 08:57:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4CC9B61A1C;\n\tMon, 17 Jun 2024 10:57:42 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 93E9A61A1C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 17 Jun 2024 10:57:40 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7F0BA2D5;\n\tMon, 17 Jun 2024 10:57:22 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mIghgeXp\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718614642;\n\tbh=XnlnsKDnsywh12WA97A28HuppTcfdy+jnu81GBucOgU=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=mIghgeXpnO6PtHDn/Upt49fUiaLdH2i5Uo+9l3R1k84SEsa1Dr59qzKb768v9uQb5\n\tdHqy/UCTbLaVVFn2f4xIOlKk2jGlmTRszUbtvexOPXi5v8S+J1EK3qdFqIuYWp3YFI\n\tJ9RLbKCwMQCfFZfWHKmMeouZir7D/tmKOef9BnLc=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240616163910.5506-2-laurent.pinchart@ideasonboard.com>","References":"<20240616163910.5506-1-laurent.pinchart@ideasonboard.com>\n\t<20240616163910.5506-2-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH 01/12] ipa: rkisp1: agc: Fix initialization without\n\tmetering modes","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 17 Jun 2024 09:57:36 +0100","Message-ID":"<171861465646.2248009.8134780494180387782@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":29984,"web_url":"https://patchwork.libcamera.org/comment/29984/","msgid":"<ZnALeFq908RpDc9n@pyrite.rasen.tech>","date":"2024-06-17T10:10:00","subject":"Re: [PATCH 01/12] ipa: rkisp1: agc: Fix initialization without\n\tmetering modes","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Sun, Jun 16, 2024 at 07:38:59PM +0300, Laurent Pinchart wrote:\n> When no metering modes are specified in the tuning file, the AGC\n> initialzation fails with\n> \n> [0:00:46.148508875] [209] ERROR RkISP1Agc agc.cpp:46 'AeMeteringMode' parameter not found in tuning file\n> \n> which results in a camera initialization failure. Fix it by downgrading\n> the error into a warning, and continuing the AGC initialization with the\n> default metering mode.\n> \n> Fixes: 35233938ee5d (\"ipa: rkisp1: agc: Read histogram weights from tuning file\")\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/ipa/rkisp1/algorithms/agc.cpp | 6 ++----\n>  1 file changed, 2 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\n> index 8702145187c7..0f60d08fd41c 100644\n> --- a/src/ipa/rkisp1/algorithms/agc.cpp\n> +++ b/src/ipa/rkisp1/algorithms/agc.cpp\n> @@ -42,11 +42,9 @@ LOG_DEFINE_CATEGORY(RkISP1Agc)\n>  \n>  int Agc::parseMeteringModes(IPAContext &context, const YamlObject &tuningData)\n>  {\n> -\tif (!tuningData.isDictionary()) {\n> -\t\tLOG(RkISP1Agc, Error)\n> +\tif (!tuningData.isDictionary())\n> +\t\tLOG(RkISP1Agc, Warning)\n>  \t\t\t<< \"'AeMeteringMode' parameter not found in tuning file\";\n> -\t\treturn -EINVAL;\n> -\t}\n>  \n>  \tfor (const auto &[key, value] : tuningData.asDict()) {\n>  \t\tif (controls::AeMeteringModeNameValueMap.find(key) ==","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 8CF1CBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 17 Jun 2024 10:10:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 885A365494;\n\tMon, 17 Jun 2024 12:10:10 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D25FC6548B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 17 Jun 2024 12:10:08 +0200 (CEST)","from pyrite.rasen.tech (h175-177-049-156.catv02.itscom.jp\n\t[175.177.49.156])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 13A112D5;\n\tMon, 17 Jun 2024 12:09:50 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Dt4xOCZR\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718618992;\n\tbh=TET8TVeNLoRJuSJzwdHmCCViSmzjaUvI6aRfr/C13O4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Dt4xOCZRsJtC4Jw2TrqaqxgW0OrdCMieDuvQmvEazrHK6ssMHNjWSlDhoVjKw8naR\n\tjynFgupLDLNhpabLr8R53mjSK7KUFwqw/ctvNenitAMLFx2fDWl9iRdQAf94PhPbIq\n\t7CTzc/Qj2OfWGMCEuPBsjmxTB/B+OZ1mqG3YOF+Q=","Date":"Mon, 17 Jun 2024 19:10:00 +0900","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 01/12] ipa: rkisp1: agc: Fix initialization without\n\tmetering modes","Message-ID":"<ZnALeFq908RpDc9n@pyrite.rasen.tech>","References":"<20240616163910.5506-1-laurent.pinchart@ideasonboard.com>\n\t<20240616163910.5506-2-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20240616163910.5506-2-laurent.pinchart@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]