[{"id":30179,"web_url":"https://patchwork.libcamera.org/comment/30179/","msgid":"<171983013996.392292.13588100769966761124@ping.linuxembedded.co.uk>","date":"2024-07-01T10:35:39","subject":"Re: [PATCH 1/2] libcamera: ipa_proxy: Report a missing configuration\n\tas a warning","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Milan Zamazal (2024-06-27 18:33:04)\n> When the configuration file for an IPA module is missing, it is reported\n> as an error in the log, for example:\n> \n>   ERROR IPAProxy ipa_proxy.cpp:149 Configuration file 'imx219.yaml' not found for IPA module 'simple'\n> \n> This is misleading because several pipelines use uncalibrated.yaml in\n> such a case and can continue working.  And in case of software ISP,\n> there is currently no other configuration file so the error is always\n> reported.\n\nI'm in two minds for this. At the moment, the SoftISP doesn't use a\ntuning file because it's not implemented.\n\nBut I /would/ expect there to be one in the future.\n\nI believe we report it as an error as without a tuning file, we expect\nthere will always be a degraded image quality.\n\nBut ... indeed - it still continues. So what's the difference between an\nerror and a warning ?\n\n\n\n> \n> Let's change the error to warning to not confuse users.\n> \n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>  src/libcamera/ipa_proxy.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> index 6c17c456..494ed736 100644\n> --- a/src/libcamera/ipa_proxy.cpp\n> +++ b/src/libcamera/ipa_proxy.cpp\n> @@ -146,7 +146,7 @@ std::string IPAProxy::configurationFile(const std::string &name) const\n>                 }\n>         }\n>  \n> -       LOG(IPAProxy, Error)\n> +       LOG(IPAProxy, Warning)\n>                 << \"Configuration file '\" << name\n>                 << \"' not found for IPA module '\" << ipaName << \"'\";\n>  \n> -- \n> 2.44.1\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 750FABEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Jul 2024 10:35:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 074FA62C98;\n\tMon,  1 Jul 2024 12:35:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A30A5619C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Jul 2024 12:35:42 +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 CA70D63D;\n\tMon,  1 Jul 2024 12:35:15 +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=\"Dh34UXhI\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719830115;\n\tbh=/O6h8A39QGxqPf8PYGHImg3cY03GD9ymk+7Jeki9m4o=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Dh34UXhIEZHvzY1DC2nmxDVk2vwp/Ybz3Py+PKvrlZA77It9Q6t2iS8WoDqfb1ryd\n\tK6F6aOxnsBzXC0715EPv3Kx22Mps91We0v1+cG+aGhQa5Jyy/t2p1uXyFfxXasMahh\n\tQkn9uMf3ZrwGbIZEkwenpr2AQHP6mTLAGs4PrBkA=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240627173305.1477718-2-mzamazal@redhat.com>","References":"<20240627173305.1477718-1-mzamazal@redhat.com>\n\t<20240627173305.1477718-2-mzamazal@redhat.com>","Subject":"Re: [PATCH 1/2] libcamera: ipa_proxy: Report a missing configuration\n\tas a warning","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Milan Zamazal <mzamazal@redhat.com>","To":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Date":"Mon, 01 Jul 2024 11:35:39 +0100","Message-ID":"<171983013996.392292.13588100769966761124@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":30182,"web_url":"https://patchwork.libcamera.org/comment/30182/","msgid":"<87plrx5l1w.fsf@redhat.com>","date":"2024-07-01T12:55:07","subject":"Re: [PATCH 1/2] libcamera: ipa_proxy: Report a missing\n\tconfiguration as a warning","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Kieran,\n\nthank you for review.\n\nKieran Bingham <kieran.bingham@ideasonboard.com> writes:\n\n> Quoting Milan Zamazal (2024-06-27 18:33:04)\n>> When the configuration file for an IPA module is missing, it is reported\n>> as an error in the log, for example:\n>\n>> \n>>   ERROR IPAProxy ipa_proxy.cpp:149 Configuration file 'imx219.yaml' not found for IPA module\n>> 'simple'\n>> \n>> This is misleading because several pipelines use uncalibrated.yaml in\n>> such a case and can continue working.  And in case of software ISP,\n>> there is currently no other configuration file so the error is always\n>> reported.\n>\n> I'm in two minds for this. At the moment, the SoftISP doesn't use a\n> tuning file because it's not implemented.\n>\n> But I /would/ expect there to be one in the future.\n\nYes.\n\n> I believe we report it as an error as without a tuning file, we expect\n> there will always be a degraded image quality.\n>\n> But ... indeed - it still continues. So what's the difference between an\n> error and a warning ?\n\nI cannot know better than you what is a contingent libcamera policy, but\ngenerally, I'd say error is something that prevents some important part\nfrom working at all while warning is something that the user should pay\nattention to but the action can still be performed, although perhaps in\na degraded or unintended way.\n\nIn this specific case I have experienced the following interaction with\na user:\n\n- \"Hmm, it doesn't work.\"\n- \"Sure, it reports an error!\"\n- \"But this one is harmless.\"\n- \"Are you sure?  It clearly reports that it is an error.\"\n- \"Yes, it always prints this error, it's not the problem.\"\n- \"Really?  Hmm, OK.\"\n\nI think that at least with software ISP, it shouldn't be reported as an\nerror.  But I don't insist on this fix, another obvious fix might be\nimplementing tuning files in software ISP, or perhaps some workaround.\nWhat would you suggest?\n\n>> Let's change the error to warning to not confuse users.\n>> \n>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> ---\n>>  src/libcamera/ipa_proxy.cpp | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>> \n>> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n>> index 6c17c456..494ed736 100644\n>> --- a/src/libcamera/ipa_proxy.cpp\n>> +++ b/src/libcamera/ipa_proxy.cpp\n>> @@ -146,7 +146,7 @@ std::string IPAProxy::configurationFile(const std::string &name) const\n>>                 }\n>>         }\n>>  \n>> -       LOG(IPAProxy, Error)\n>> +       LOG(IPAProxy, Warning)\n>>                 << \"Configuration file '\" << name\n>>                 << \"' not found for IPA module '\" << ipaName << \"'\";\n>>  \n>> -- \n>> 2.44.1\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 CFB3DBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Jul 2024 12:55:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B6E7E62E01;\n\tMon,  1 Jul 2024 14:55:14 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C0BBF604C1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Jul 2024 14:55:12 +0200 (CEST)","from mail-ed1-f71.google.com (mail-ed1-f71.google.com\n\t[209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-196-L3hxGmxEPEG7OzXD20YKEg-1; Mon, 01 Jul 2024 08:55:10 -0400","by mail-ed1-f71.google.com with SMTP id\n\t4fb4d7f45d1cf-57d05ce92ecso140456a12.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 01 Jul 2024 05:55:10 -0700 (PDT)","from nuthatch (ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t4fb4d7f45d1cf-5861324dc9bsm4353551a12.25.2024.07.01.05.55.07\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 01 Jul 2024 05:55:07 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"eCpg4uyl\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1719838511;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=WBd43I3glPtjyZnZJgouYUAVY+62iKUDafZdywVCH0A=;\n\tb=eCpg4uyl2bEa0Cw563eVI4xJe26X9XzLkgyPq3C3kZq6WhUB28sYoHQ+kfh9AbWBbuuIaF\n\tCZwlYQI+MAvZxZA0HyyzUibVLJBzLGEQ6mQDSf9lbB5YYJaBFxIlKMmcPHu/R9XFBVdkuz\n\tR0vk92JdbPgAj5nfi9fIQVo1nPZL+5E=","X-MC-Unique":"L3hxGmxEPEG7OzXD20YKEg-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1719838509; x=1720443309;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=WBd43I3glPtjyZnZJgouYUAVY+62iKUDafZdywVCH0A=;\n\tb=QVRSsnR8uoKSLa7da43NVPJXoyVGj93XWm1qTAhZxVigFuB00BP6Cml5Hhdx0gl3k7\n\tAbg5RY3Xi0AhZABZkX74dl2LCYs0Loclj/gCYStIhAwinnBMy4A1NnmZuX2MYo/iiZpY\n\tdx94he4IpAG4JaUgZSNGivCpByQSGqBBvcnfEe2UCogOOkEGF4+hI+LwmlXcP9avQBN/\n\tnTvU19b6gdw5BPRDkG3MnUG7u9/5xU/QfNTTtGNjDRAwVqE0jCfclkW3bC0tRBXrUZL5\n\tkXP8MImyEP5VZT4SryVdPDESYkpRk+rUON9v5V6aJ3O0oJ/F+XVfwm5GgMR6sJpmMHkr\n\tbIlQ==","X-Gm-Message-State":"AOJu0YyeTpMvl1rH/BqeP3SoQV57T8EAo7R084kY7rfiiStR5OwuSXyy\n\tFCYcX6FPCTLDn4+GNfLOFHoOaW8W3SNAK8efZrO56GJvrMJpSzxsoxYfMfCc/alnU2J/IsvJf1X\n\tdFlOhNdE352q1JUHzKeasWWQ3HAz/st2K30+iAiOxWhy7CjG3+MvhHOw4wzcscqf/4FIFGPn1du\n\tiNbmwGYMUIEp0O+5iDlJkT5UxJF1Wa/rcjF6SV61pSydFSqbfsA3qShL8=","X-Received":["by 2002:a05:6402:27ce:b0:572:4fc3:3a28 with SMTP id\n\t4fb4d7f45d1cf-5879f982ffamr4147711a12.23.1719838508960; \n\tMon, 01 Jul 2024 05:55:08 -0700 (PDT)","by 2002:a05:6402:27ce:b0:572:4fc3:3a28 with SMTP id\n\t4fb4d7f45d1cf-5879f982ffamr4147694a12.23.1719838508476; \n\tMon, 01 Jul 2024 05:55:08 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IFyowHSg9zjfzI/ABhiAaW2rVRDAvqPRoBZ3URKnZdk8DO5jvRe9V8x3+iKQMwaocCjP1pTbA==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 1/2] libcamera: ipa_proxy: Report a missing\n\tconfiguration as a warning","In-Reply-To":"<171983013996.392292.13588100769966761124@ping.linuxembedded.co.uk>\n\t(Kieran Bingham's message of \"Mon, 01 Jul 2024 11:35:39 +0100\")","References":"<20240627173305.1477718-1-mzamazal@redhat.com>\n\t<20240627173305.1477718-2-mzamazal@redhat.com>\n\t<171983013996.392292.13588100769966761124@ping.linuxembedded.co.uk>","Date":"Mon, 01 Jul 2024 14:55:07 +0200","Message-ID":"<87plrx5l1w.fsf@redhat.com>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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":30188,"web_url":"https://patchwork.libcamera.org/comment/30188/","msgid":"<171984329465.3353312.13797742374191471056@ping.linuxembedded.co.uk>","date":"2024-07-01T14:14:54","subject":"Re: [PATCH 1/2] libcamera: ipa_proxy: Report a missing configuration\n\tas a warning","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Milan Zamazal (2024-07-01 13:55:07)\n> Hi Kieran,\n> \n> thank you for review.\n> \n> Kieran Bingham <kieran.bingham@ideasonboard.com> writes:\n> \n> > Quoting Milan Zamazal (2024-06-27 18:33:04)\n> >> When the configuration file for an IPA module is missing, it is reported\n> >> as an error in the log, for example:\n> >\n> >> \n> >>   ERROR IPAProxy ipa_proxy.cpp:149 Configuration file 'imx219.yaml' not found for IPA module\n> >> 'simple'\n> >> \n> >> This is misleading because several pipelines use uncalibrated.yaml in\n> >> such a case and can continue working.  And in case of software ISP,\n> >> there is currently no other configuration file so the error is always\n> >> reported.\n> >\n> > I'm in two minds for this. At the moment, the SoftISP doesn't use a\n> > tuning file because it's not implemented.\n> >\n> > But I /would/ expect there to be one in the future.\n> \n> Yes.\n> \n> > I believe we report it as an error as without a tuning file, we expect\n> > there will always be a degraded image quality.\n> >\n> > But ... indeed - it still continues. So what's the difference between an\n> > error and a warning ?\n> \n> I cannot know better than you what is a contingent libcamera policy, but\n> generally, I'd say error is something that prevents some important part\n> from working at all while warning is something that the user should pay\n> attention to but the action can still be performed, although perhaps in\n> a degraded or unintended way.\n> \n> In this specific case I have experienced the following interaction with\n> a user:\n> \n> - \"Hmm, it doesn't work.\"\n> - \"Sure, it reports an error!\"\n> - \"But this one is harmless.\"\n> - \"Are you sure?  It clearly reports that it is an error.\"\n> - \"Yes, it always prints this error, it's not the problem.\"\n> - \"Really?  Hmm, OK.\"\n> \n> I think that at least with software ISP, it shouldn't be reported as an\n> error.  But I don't insist on this fix, another obvious fix might be\n> implementing tuning files in software ISP, or perhaps some workaround.\n> What would you suggest?\n\nI too have had to tell people \"Oh ... yeah you can ignore that error\" (I\ncan't remember if it was this or another case\" ... and I think if\nsomething can be ignored ... is it really an error?\n\nThe tricky part here is ... on RPi - it really is considered an error\nand the camera will not be constructed without a tuning file I believe,\nwhile on other platforms (at least for now) it is only a warning...\n\nI still don't know the right answer yet I'm afraid :S\n\n--\nKieran\n\n\n> \n> >> Let's change the error to warning to not confuse users.\n> >> \n> >> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> >> ---\n> >>  src/libcamera/ipa_proxy.cpp | 2 +-\n> >>  1 file changed, 1 insertion(+), 1 deletion(-)\n> >> \n> >> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> >> index 6c17c456..494ed736 100644\n> >> --- a/src/libcamera/ipa_proxy.cpp\n> >> +++ b/src/libcamera/ipa_proxy.cpp\n> >> @@ -146,7 +146,7 @@ std::string IPAProxy::configurationFile(const std::string &name) const\n> >>                 }\n> >>         }\n> >>  \n> >> -       LOG(IPAProxy, Error)\n> >> +       LOG(IPAProxy, Warning)\n> >>                 << \"Configuration file '\" << name\n> >>                 << \"' not found for IPA module '\" << ipaName << \"'\";\n> >>  \n> >> -- \n> >> 2.44.1\n> >>\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 D6FB8BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Jul 2024 14:15:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 19D1D62E01;\n\tMon,  1 Jul 2024 16:15:00 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F43D604C1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Jul 2024 16:14:58 +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 3FD66289;\n\tMon,  1 Jul 2024 16:14:31 +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=\"L+hpwfua\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719843271;\n\tbh=R9ITbG0bV6REdfo66NH5pKcjdpNAb89ahIIO/mkv2Xk=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=L+hpwfuaWXIa6/yT2Dsoo1YHeT87XBDI8D7sR0A6mKT4z98CbE+QQ4zHTPO50QqKc\n\tCc38ksk9ibpwmLPpHHyRQUu6Fw593waaiDE5m9EC9H19Zr+oZFqT7PpI3xD/9g5G4x\n\tJFx2/hdVO/lam23qwBRQ2Zsysp6cXHn1JyPyHiQ0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<87plrx5l1w.fsf@redhat.com>","References":"<20240627173305.1477718-1-mzamazal@redhat.com>\n\t<20240627173305.1477718-2-mzamazal@redhat.com>\n\t<171983013996.392292.13588100769966761124@ping.linuxembedded.co.uk>\n\t<87plrx5l1w.fsf@redhat.com>","Subject":"Re: [PATCH 1/2] libcamera: ipa_proxy: Report a missing configuration\n\tas a warning","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"Milan Zamazal <mzamazal@redhat.com>","Date":"Mon, 01 Jul 2024 15:14:54 +0100","Message-ID":"<171984329465.3353312.13797742374191471056@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":30378,"web_url":"https://patchwork.libcamera.org/comment/30378/","msgid":"<87h6d09i0b.fsf@redhat.com>","date":"2024-07-08T12:37:40","subject":"Re: [PATCH 1/2] libcamera: ipa_proxy: Report a missing\n\tconfiguration as a warning","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Kieran Bingham <kieran.bingham@ideasonboard.com> writes:\n\n> Quoting Milan Zamazal (2024-07-01 13:55:07)\n>> Hi Kieran,\n>> \n>\n>> thank you for review.\n>> \n>> Kieran Bingham <kieran.bingham@ideasonboard.com> writes:\n>> \n>> > Quoting Milan Zamazal (2024-06-27 18:33:04)\n>> >> When the configuration file for an IPA module is missing, it is reported\n>> >> as an error in the log, for example:\n>> >\n>> >> \n>> >>   ERROR IPAProxy ipa_proxy.cpp:149 Configuration file 'imx219.yaml' not found for IPA module\n>> >> 'simple'\n>> >> \n>> >> This is misleading because several pipelines use uncalibrated.yaml in\n>> >> such a case and can continue working.  And in case of software ISP,\n>> >> there is currently no other configuration file so the error is always\n>> >> reported.\n>> >\n>> > I'm in two minds for this. At the moment, the SoftISP doesn't use a\n>> > tuning file because it's not implemented.\n>> >\n>> > But I /would/ expect there to be one in the future.\n>> \n>> Yes.\n>> \n>> > I believe we report it as an error as without a tuning file, we expect\n>> > there will always be a degraded image quality.\n>> >\n>> > But ... indeed - it still continues. So what's the difference between an\n>> > error and a warning ?\n>> \n>> I cannot know better than you what is a contingent libcamera policy, but\n>> generally, I'd say error is something that prevents some important part\n>> from working at all while warning is something that the user should pay\n>> attention to but the action can still be performed, although perhaps in\n>> a degraded or unintended way.\n>> \n>> In this specific case I have experienced the following interaction with\n>> a user:\n>> \n>> - \"Hmm, it doesn't work.\"\n>> - \"Sure, it reports an error!\"\n>> - \"But this one is harmless.\"\n>> - \"Are you sure?  It clearly reports that it is an error.\"\n>> - \"Yes, it always prints this error, it's not the problem.\"\n>> - \"Really?  Hmm, OK.\"\n>> \n>> I think that at least with software ISP, it shouldn't be reported as an\n>> error.  But I don't insist on this fix, another obvious fix might be\n>> implementing tuning files in software ISP, or perhaps some workaround.\n>> What would you suggest?\n>\n> I too have had to tell people \"Oh ... yeah you can ignore that error\" (I\n> can't remember if it was this or another case\" ... and I think if\n> something can be ignored ... is it really an error?\n>\n> The tricky part here is ... on RPi - it really is considered an error\n> and the camera will not be constructed without a tuning file I believe,\n> while on other platforms (at least for now) it is only a warning...\n>\n> I still don't know the right answer yet I'm afraid :S\n\nOK, let's instruct IPAProxy::configurationFile what to do in such a\ncase.  See v2 where I add a fallback file argument, which looks a bit\nbetter to me than just adding a boolean flag, although it may not be\nactually necessarily better.  Let's try and discuss.\n\n> --\n> Kieran\n>\n>\n>> \n>> >> Let's change the error to warning to not confuse users.\n>> >> \n>> >> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> >> ---\n>> >>  src/libcamera/ipa_proxy.cpp | 2 +-\n>> >>  1 file changed, 1 insertion(+), 1 deletion(-)\n>> >> \n>> >> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n>> >> index 6c17c456..494ed736 100644\n>> >> --- a/src/libcamera/ipa_proxy.cpp\n>> >> +++ b/src/libcamera/ipa_proxy.cpp\n>> >> @@ -146,7 +146,7 @@ std::string IPAProxy::configurationFile(const std::string &name) const\n>> >>                 }\n>> >>         }\n>> >>  \n>> >> -       LOG(IPAProxy, Error)\n>> >> +       LOG(IPAProxy, Warning)\n>> >>                 << \"Configuration file '\" << name\n>> >>                 << \"' not found for IPA module '\" << ipaName << \"'\";\n>> >>  \n>> >> -- \n>> >> 2.44.1\n>> >>\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 76642BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  8 Jul 2024 12:37:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2F2A56336A;\n\tMon,  8 Jul 2024 14:37:49 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6994963364\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  8 Jul 2024 14:37:47 +0200 (CEST)","from mail-wm1-f70.google.com (mail-wm1-f70.google.com\n\t[209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-412-S4zpHrY2PruGYCbD9MdeCw-1; Mon, 08 Jul 2024 08:37:44 -0400","by mail-wm1-f70.google.com with SMTP id\n\t5b1f17b1804b1-4265f7f395cso14440975e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 08 Jul 2024 05:37:44 -0700 (PDT)","from nuthatch (ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4264a1d50c3sm164206465e9.2.2024.07.08.05.37.41\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 08 Jul 2024 05:37:41 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"dbr0Bk4p\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1720442266;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=PxaQMQcV7EvoV9j3KwodIxXWyYNXCGTjY/t6yV9k4Pw=;\n\tb=dbr0Bk4pEIuCAbXV35HN/qttmIMnz09OUErj/F+8Lz+mAz9JcwzB8lddf0P+hkTs2k6vfD\n\tgNRQD/l45vxT+HvcE0DnW2AwVKXg35iImXnGG3DXwjlp9NWWBpBEiUYalTHo6nwfq/uA2+\n\tmDYbW345E0DU5aV/YmDhPYWEKErNUV8=","X-MC-Unique":"S4zpHrY2PruGYCbD9MdeCw-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1720442262; x=1721047062;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=PxaQMQcV7EvoV9j3KwodIxXWyYNXCGTjY/t6yV9k4Pw=;\n\tb=dcJiFSj9JNJ1LwyZS7fMqzv3I0b+o30CbZBtgNdcSUOLiRU8loJEyQ0YYXAz7fxBU7\n\tqI9gyMCaoRask0CTZsYn+YlODSRSWJ6peRgZTzdbJ31G0CvR+kQsJE7EqA700FXL0IO/\n\t8da0FO1mvMkwUQRCZTicCcdp2cIicDJtWIdKQKX/ONa3KOle8gGhzIQ6f4QlIDt4ANLU\n\tRSYsZyxwpnWT9CwX0dSmawVyZfWsnshwI7fdZYe3unkETnyhgqASv26ZbwpKKDrt3zwS\n\t8ePjBouyUPKuFliGUeeoIadCeiYpACwXcWjavfOvKkyaBan/xVp90e0Yzbdt8VutPCaZ\n\tgJfQ==","X-Gm-Message-State":"AOJu0YxH6YN+QTp54IpfrGz75+hAVHZ2Me2hLxIPpuCS4UW/Qzcj0afK\n\tl/bPw8ZNyz6P8250y/7h/zzEw9/5s9EitDOCo/Mui89UwIm5OudHKz9EscGqij81BK/efpv8R8Y\n\tJIX27ZB0Zii5Ryc48jxh3+iUHIYn6uON7dyxPKo3+LxTz9xrmBh76zje0b5zpC9QW0aQTth+wqn\n\tWayAtQp9iMJ7Hnb6LXgv6mqIuku5mSV9Fv0gBEcxxiLQCoCoYG+EcOzic=","X-Received":["by 2002:a05:600c:2d07:b0:426:66a2:b200 with SMTP id\n\t5b1f17b1804b1-42666a2b55bmr25218965e9.0.1720442262408; \n\tMon, 08 Jul 2024 05:37:42 -0700 (PDT)","by 2002:a05:600c:2d07:b0:426:66a2:b200 with SMTP id\n\t5b1f17b1804b1-42666a2b55bmr25218795e9.0.1720442261912; \n\tMon, 08 Jul 2024 05:37:41 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IFFCLAeDwM7pkrkh0gRPmrUJpznOv5blXD3f3RXu5rDskHPWXJ0c+kU3H9L63qB3npi8XwueQ==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 1/2] libcamera: ipa_proxy: Report a missing\n\tconfiguration as a warning","In-Reply-To":"<171984329465.3353312.13797742374191471056@ping.linuxembedded.co.uk>\n\t(Kieran Bingham's message of \"Mon, 01 Jul 2024 15:14:54 +0100\")","References":"<20240627173305.1477718-1-mzamazal@redhat.com>\n\t<20240627173305.1477718-2-mzamazal@redhat.com>\n\t<171983013996.392292.13588100769966761124@ping.linuxembedded.co.uk>\n\t<87plrx5l1w.fsf@redhat.com>\n\t<171984329465.3353312.13797742374191471056@ping.linuxembedded.co.uk>","Date":"Mon, 08 Jul 2024 14:37:40 +0200","Message-ID":"<87h6d09i0b.fsf@redhat.com>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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>"}}]