[{"id":15579,"web_url":"https://patchwork.libcamera.org/comment/15579/","msgid":"<YEf1l9yzi3boLt+1@pendragon.ideasonboard.com>","date":"2021-03-09T22:24:23","subject":"Re: [libcamera-devel] [PATCH v3 2/3] src: rkisp1: return error from\n\tipa's configure method if it fails","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Dafna,\n\nThank you for the patch.\n\nThe subject line should start with \"ipa: rkisp1: ...\".\n\nOn Tue, Mar 09, 2021 at 07:38:28AM +0100, Dafna Hirschfeld wrote:\n> The IPA of rkisp1 relies on some of the camera's controls.\n> Therefore it can't work if those controls are not given.\n> Return -EINVAL from 'configure' in that case.\n> Also return error from the pipeline's 'configure' method\n> if the IPA configure fails.\n> \n> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>\n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  include/libcamera/ipa/rkisp1.mojom       |  2 +-\n>  src/ipa/rkisp1/rkisp1.cpp                | 11 ++++++-----\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp |  7 +++++--\n>  3 files changed, 12 insertions(+), 8 deletions(-)\n> \n> diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom\n> index 9270f9c7..95fa0d93 100644\n> --- a/include/libcamera/ipa/rkisp1.mojom\n> +++ b/include/libcamera/ipa/rkisp1.mojom\n> @@ -31,7 +31,7 @@ interface IPARkISP1Interface {\n>  \n>  \tconfigure(CameraSensorInfo sensorInfo,\n>  \t\t  map<uint32, IPAStream> streamConfig,\n> -\t\t  map<uint32, ControlInfoMap> entityControls) => ();\n> +\t\t  map<uint32, ControlInfoMap> entityControls) => (int32 ret);\n>  \n>  \tmapBuffers(array<IPABuffer> buffers);\n>  \tunmapBuffers(array<uint32> ids);\n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index f11aeb40..0b0f31e4 100644\n> --- a/src/ipa/rkisp1/rkisp1.cpp\n> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> @@ -38,7 +38,7 @@ public:\n>  \tint start() override { return 0; }\n>  \tvoid stop() override {}\n>  \n> -\tvoid configure(const CameraSensorInfo &info,\n> +\tint configure(const CameraSensorInfo &info,\n>  \t\t       const std::map<uint32_t, IPAStream> &streamConfig,\n>  \t\t       const std::map<uint32_t, ControlInfoMap> &entityControls) override;\n\nIndentation should be adjusted here.\n\n>  \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n> @@ -75,25 +75,25 @@ private:\n>   * assemble one. Make sure the reported sensor information are relevant\n>   * before accessing them.\n>   */\n> -void IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info,\n> +int IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info,\n>  \t\t\t  [[maybe_unused]] const std::map<uint32_t, IPAStream> &streamConfig,\n>  \t\t\t  const std::map<uint32_t, ControlInfoMap> &entityControls)\n\nAnd here too.\n\n>  {\n>  \tif (entityControls.empty())\n> -\t\treturn;\n> +\t\treturn -EINVAL;\n>  \n>  \tctrls_ = entityControls.at(0);\n>  \n>  \tconst auto itExp = ctrls_.find(V4L2_CID_EXPOSURE);\n>  \tif (itExp == ctrls_.end()) {\n>  \t\tLOG(IPARkISP1, Error) << \"Can't find exposure control\";\n> -\t\treturn;\n> +\t\treturn -EINVAL;\n>  \t}\n>  \n>  \tconst auto itGain = ctrls_.find(V4L2_CID_ANALOGUE_GAIN);\n>  \tif (itGain == ctrls_.end()) {\n>  \t\tLOG(IPARkISP1, Error) << \"Can't find gain control\";\n> -\t\treturn;\n> +\t\treturn -EINVAL;\n>  \t}\n>  \n>  \tautoExposure_ = true;\n> @@ -111,6 +111,7 @@ void IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info,\n>  \t\t<< \" Gain: \" << minGain_ << \"-\" << maxGain_;\n>  \n>  \tsetControls(0);\n> +\treturn 0;\n>  }\n>  \n>  void IPARkISP1::mapBuffers(const std::vector<IPABuffer> &buffers)\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 538c0139..34814f62 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -653,8 +653,11 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n>  \tstd::map<uint32_t, ControlInfoMap> entityControls;\n>  \tentityControls.emplace(0, data->sensor_->controls());\n>  \n> -\tdata->ipa_->configure(sensorInfo, streamConfig, entityControls);\n> -\n> +\tret = data->ipa_->configure(sensorInfo, streamConfig, entityControls);\n> +\tif (ret) {\n> +\t\tLOG(RkISP1, Error) << \"failed configuring IPA (\" << ret << \")\";\n> +\t\treturn ret;\n> +\t}\n>  \treturn 0;\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 B8E51BD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Mar 2021 22:24:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 46C5168AA3;\n\tTue,  9 Mar 2021 23:24:57 +0100 (CET)","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 F0A7768A99\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Mar 2021 23:24:55 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4CDC5E9;\n\tTue,  9 Mar 2021 23:24:55 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"McnY2Rtc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615328695;\n\tbh=gxXjmDOJEBgH7bjvrQJfxUNwW2+BcWGrbAX0RfI/qFg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=McnY2Rtckix6YOTVQuk8lM2lb/b1A8wgj707pFdKjRL/GsSfdmY5vDeFXyRvZGwSf\n\tTN3va2vq61d8I16wruQ9ybUVfQcC6jxknaY1uZc4GlcUGNYLtTf3WLzQAFEzf6vxWH\n\tsmMW5oVF81v3AW6hOb6jwYd7Xp1sDj0+uE4xk7TI=","Date":"Wed, 10 Mar 2021 00:24:23 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Dafna Hirschfeld <dafna.hirschfeld@collabora.com>","Message-ID":"<YEf1l9yzi3boLt+1@pendragon.ideasonboard.com>","References":"<20210309063829.8710-1-dafna.hirschfeld@collabora.com>\n\t<20210309063829.8710-3-dafna.hirschfeld@collabora.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210309063829.8710-3-dafna.hirschfeld@collabora.com>","Subject":"Re: [libcamera-devel] [PATCH v3 2/3] src: rkisp1: return error from\n\tipa's configure method if it fails","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>","Cc":"libcamera-devel@lists.libcamera.org, kernel@collabora.com","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15581,"web_url":"https://patchwork.libcamera.org/comment/15581/","msgid":"<1d1a47f2-0135-b266-a852-d4f1a9e8059c@collabora.com>","date":"2021-03-10T06:36:11","subject":"Re: [libcamera-devel] [PATCH v3 2/3] src: rkisp1: return error from\n\tipa's configure method if it fails","submitter":{"id":46,"url":"https://patchwork.libcamera.org/api/people/46/","name":"Dafna Hirschfeld","email":"dafna.hirschfeld@collabora.com"},"content":"On 09.03.21 23:24, Laurent Pinchart wrote:\n> Hi Dafna,\n> \n> Thank you for the patch.\n> \n> The subject line should start with \"ipa: rkisp1: ...\".\n\nI changed both the ipa and the pipeline in this patch so\nI thought just 'ipa: rkisp1:' is wrong.\n\nthanks,\nDafna\n\n> \n> On Tue, Mar 09, 2021 at 07:38:28AM +0100, Dafna Hirschfeld wrote:\n>> The IPA of rkisp1 relies on some of the camera's controls.\n>> Therefore it can't work if those controls are not given.\n>> Return -EINVAL from 'configure' in that case.\n>> Also return error from the pipeline's 'configure' method\n>> if the IPA configure fails.\n>>\n>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>\n>> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>> ---\n>>   include/libcamera/ipa/rkisp1.mojom       |  2 +-\n>>   src/ipa/rkisp1/rkisp1.cpp                | 11 ++++++-----\n>>   src/libcamera/pipeline/rkisp1/rkisp1.cpp |  7 +++++--\n>>   3 files changed, 12 insertions(+), 8 deletions(-)\n>>\n>> diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom\n>> index 9270f9c7..95fa0d93 100644\n>> --- a/include/libcamera/ipa/rkisp1.mojom\n>> +++ b/include/libcamera/ipa/rkisp1.mojom\n>> @@ -31,7 +31,7 @@ interface IPARkISP1Interface {\n>>   \n>>   \tconfigure(CameraSensorInfo sensorInfo,\n>>   \t\t  map<uint32, IPAStream> streamConfig,\n>> -\t\t  map<uint32, ControlInfoMap> entityControls) => ();\n>> +\t\t  map<uint32, ControlInfoMap> entityControls) => (int32 ret);\n>>   \n>>   \tmapBuffers(array<IPABuffer> buffers);\n>>   \tunmapBuffers(array<uint32> ids);\n>> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n>> index f11aeb40..0b0f31e4 100644\n>> --- a/src/ipa/rkisp1/rkisp1.cpp\n>> +++ b/src/ipa/rkisp1/rkisp1.cpp\n>> @@ -38,7 +38,7 @@ public:\n>>   \tint start() override { return 0; }\n>>   \tvoid stop() override {}\n>>   \n>> -\tvoid configure(const CameraSensorInfo &info,\n>> +\tint configure(const CameraSensorInfo &info,\n>>   \t\t       const std::map<uint32_t, IPAStream> &streamConfig,\n>>   \t\t       const std::map<uint32_t, ControlInfoMap> &entityControls) override;\n> \n> Indentation should be adjusted here.\n> \n>>   \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n>> @@ -75,25 +75,25 @@ private:\n>>    * assemble one. Make sure the reported sensor information are relevant\n>>    * before accessing them.\n>>    */\n>> -void IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info,\n>> +int IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info,\n>>   \t\t\t  [[maybe_unused]] const std::map<uint32_t, IPAStream> &streamConfig,\n>>   \t\t\t  const std::map<uint32_t, ControlInfoMap> &entityControls)\n> \n> And here too.\n> \n>>   {\n>>   \tif (entityControls.empty())\n>> -\t\treturn;\n>> +\t\treturn -EINVAL;\n>>   \n>>   \tctrls_ = entityControls.at(0);\n>>   \n>>   \tconst auto itExp = ctrls_.find(V4L2_CID_EXPOSURE);\n>>   \tif (itExp == ctrls_.end()) {\n>>   \t\tLOG(IPARkISP1, Error) << \"Can't find exposure control\";\n>> -\t\treturn;\n>> +\t\treturn -EINVAL;\n>>   \t}\n>>   \n>>   \tconst auto itGain = ctrls_.find(V4L2_CID_ANALOGUE_GAIN);\n>>   \tif (itGain == ctrls_.end()) {\n>>   \t\tLOG(IPARkISP1, Error) << \"Can't find gain control\";\n>> -\t\treturn;\n>> +\t\treturn -EINVAL;\n>>   \t}\n>>   \n>>   \tautoExposure_ = true;\n>> @@ -111,6 +111,7 @@ void IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info,\n>>   \t\t<< \" Gain: \" << minGain_ << \"-\" << maxGain_;\n>>   \n>>   \tsetControls(0);\n>> +\treturn 0;\n>>   }\n>>   \n>>   void IPARkISP1::mapBuffers(const std::vector<IPABuffer> &buffers)\n>> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n>> index 538c0139..34814f62 100644\n>> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n>> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n>> @@ -653,8 +653,11 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n>>   \tstd::map<uint32_t, ControlInfoMap> entityControls;\n>>   \tentityControls.emplace(0, data->sensor_->controls());\n>>   \n>> -\tdata->ipa_->configure(sensorInfo, streamConfig, entityControls);\n>> -\n>> +\tret = data->ipa_->configure(sensorInfo, streamConfig, entityControls);\n>> +\tif (ret) {\n>> +\t\tLOG(RkISP1, Error) << \"failed configuring IPA (\" << ret << \")\";\n>> +\t\treturn ret;\n>> +\t}\n>>   \treturn 0;\n>>   }\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 8B29BBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Mar 2021 06:36:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E0EF368AA1;\n\tWed, 10 Mar 2021 07:36:15 +0100 (CET)","from bhuna.collabora.co.uk (bhuna.collabora.co.uk\n\t[IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3E512602E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Mar 2021 07:36:15 +0100 (CET)","from [127.0.0.1] (localhost [127.0.0.1])\n\t(Authenticated sender: dafna) with ESMTPSA id 6BE3C1F458DE"],"To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20210309063829.8710-1-dafna.hirschfeld@collabora.com>\n\t<20210309063829.8710-3-dafna.hirschfeld@collabora.com>\n\t<YEf1l9yzi3boLt+1@pendragon.ideasonboard.com>","From":"Dafna Hirschfeld <dafna.hirschfeld@collabora.com>","Message-ID":"<1d1a47f2-0135-b266-a852-d4f1a9e8059c@collabora.com>","Date":"Wed, 10 Mar 2021 07:36:11 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<YEf1l9yzi3boLt+1@pendragon.ideasonboard.com>","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH v3 2/3] src: rkisp1: return error from\n\tipa's configure method if it fails","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>","Cc":"libcamera-devel@lists.libcamera.org, kernel@collabora.com","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15583,"web_url":"https://patchwork.libcamera.org/comment/15583/","msgid":"<YEiDmYBpqllAfRB3@pendragon.ideasonboard.com>","date":"2021-03-10T08:30:17","subject":"Re: [libcamera-devel] [PATCH v3 2/3] src: rkisp1: return error from\n\tipa's configure method if it fails","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Dafna,\n\nOn Wed, Mar 10, 2021 at 07:36:11AM +0100, Dafna Hirschfeld wrote:\n> On 09.03.21 23:24, Laurent Pinchart wrote:\n> > Hi Dafna,\n> > \n> > Thank you for the patch.\n> > \n> > The subject line should start with \"ipa: rkisp1: ...\".\n> \n> I changed both the ipa and the pipeline in this patch so\n> I thought just 'ipa: rkisp1:' is wrong.\n\nRight, as the patch touches both sides, there's no clear cut. Picking\nthe side that we consider most relevant is one option. We don't\nusually have a \"src:\" prefix in commit messages, but it's no big deal,\nit would be fine too.\n\n> > On Tue, Mar 09, 2021 at 07:38:28AM +0100, Dafna Hirschfeld wrote:\n> >> The IPA of rkisp1 relies on some of the camera's controls.\n> >> Therefore it can't work if those controls are not given.\n> >> Return -EINVAL from 'configure' in that case.\n> >> Also return error from the pipeline's 'configure' method\n> >> if the IPA configure fails.\n> >>\n> >> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>\n> >> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> >> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >> ---\n> >>   include/libcamera/ipa/rkisp1.mojom       |  2 +-\n> >>   src/ipa/rkisp1/rkisp1.cpp                | 11 ++++++-----\n> >>   src/libcamera/pipeline/rkisp1/rkisp1.cpp |  7 +++++--\n> >>   3 files changed, 12 insertions(+), 8 deletions(-)\n> >>\n> >> diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom\n> >> index 9270f9c7..95fa0d93 100644\n> >> --- a/include/libcamera/ipa/rkisp1.mojom\n> >> +++ b/include/libcamera/ipa/rkisp1.mojom\n> >> @@ -31,7 +31,7 @@ interface IPARkISP1Interface {\n> >>   \n> >>   \tconfigure(CameraSensorInfo sensorInfo,\n> >>   \t\t  map<uint32, IPAStream> streamConfig,\n> >> -\t\t  map<uint32, ControlInfoMap> entityControls) => ();\n> >> +\t\t  map<uint32, ControlInfoMap> entityControls) => (int32 ret);\n> >>   \n> >>   \tmapBuffers(array<IPABuffer> buffers);\n> >>   \tunmapBuffers(array<uint32> ids);\n> >> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> >> index f11aeb40..0b0f31e4 100644\n> >> --- a/src/ipa/rkisp1/rkisp1.cpp\n> >> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> >> @@ -38,7 +38,7 @@ public:\n> >>   \tint start() override { return 0; }\n> >>   \tvoid stop() override {}\n> >>   \n> >> -\tvoid configure(const CameraSensorInfo &info,\n> >> +\tint configure(const CameraSensorInfo &info,\n> >>   \t\t       const std::map<uint32_t, IPAStream> &streamConfig,\n> >>   \t\t       const std::map<uint32_t, ControlInfoMap> &entityControls) override;\n> > \n> > Indentation should be adjusted here.\n> > \n> >>   \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n> >> @@ -75,25 +75,25 @@ private:\n> >>    * assemble one. Make sure the reported sensor information are relevant\n> >>    * before accessing them.\n> >>    */\n> >> -void IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info,\n> >> +int IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info,\n> >>   \t\t\t  [[maybe_unused]] const std::map<uint32_t, IPAStream> &streamConfig,\n> >>   \t\t\t  const std::map<uint32_t, ControlInfoMap> &entityControls)\n> > \n> > And here too.\n> > \n> >>   {\n> >>   \tif (entityControls.empty())\n> >> -\t\treturn;\n> >> +\t\treturn -EINVAL;\n> >>   \n> >>   \tctrls_ = entityControls.at(0);\n> >>   \n> >>   \tconst auto itExp = ctrls_.find(V4L2_CID_EXPOSURE);\n> >>   \tif (itExp == ctrls_.end()) {\n> >>   \t\tLOG(IPARkISP1, Error) << \"Can't find exposure control\";\n> >> -\t\treturn;\n> >> +\t\treturn -EINVAL;\n> >>   \t}\n> >>   \n> >>   \tconst auto itGain = ctrls_.find(V4L2_CID_ANALOGUE_GAIN);\n> >>   \tif (itGain == ctrls_.end()) {\n> >>   \t\tLOG(IPARkISP1, Error) << \"Can't find gain control\";\n> >> -\t\treturn;\n> >> +\t\treturn -EINVAL;\n> >>   \t}\n> >>   \n> >>   \tautoExposure_ = true;\n> >> @@ -111,6 +111,7 @@ void IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info,\n> >>   \t\t<< \" Gain: \" << minGain_ << \"-\" << maxGain_;\n> >>   \n> >>   \tsetControls(0);\n> >> +\treturn 0;\n> >>   }\n> >>   \n> >>   void IPARkISP1::mapBuffers(const std::vector<IPABuffer> &buffers)\n> >> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> >> index 538c0139..34814f62 100644\n> >> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> >> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> >> @@ -653,8 +653,11 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n> >>   \tstd::map<uint32_t, ControlInfoMap> entityControls;\n> >>   \tentityControls.emplace(0, data->sensor_->controls());\n> >>   \n> >> -\tdata->ipa_->configure(sensorInfo, streamConfig, entityControls);\n> >> -\n> >> +\tret = data->ipa_->configure(sensorInfo, streamConfig, entityControls);\n> >> +\tif (ret) {\n> >> +\t\tLOG(RkISP1, Error) << \"failed configuring IPA (\" << ret << \")\";\n> >> +\t\treturn ret;\n> >> +\t}\n> >>   \treturn 0;\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 B7BEABD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Mar 2021 08:30:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1FA0568A9C;\n\tWed, 10 Mar 2021 09:30:53 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 17116602ED\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Mar 2021 09:30:51 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 63991F3;\n\tWed, 10 Mar 2021 09:30:50 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"IgzmG+7j\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615365050;\n\tbh=8q9eFP6o//bnL2y1VjgrhAYBXN2FDM/T0By1VKj62cI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IgzmG+7j7wvCbw53P4VucYb5pbCP53iul+W02oigW2CPknjNHZNnFRpr1VQYmNS3e\n\tm2CjoH8J2fChRPqRcn122k4IXASbMiIJwoaiM4r8CrNacKrItZ/w/L6wWsHbA5DS7p\n\tnSVU5a5zVjHbqdoa/kOWZ2G8BFDLbp+NEToQ7BEU=","Date":"Wed, 10 Mar 2021 10:30:17 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Dafna Hirschfeld <dafna.hirschfeld@collabora.com>","Message-ID":"<YEiDmYBpqllAfRB3@pendragon.ideasonboard.com>","References":"<20210309063829.8710-1-dafna.hirschfeld@collabora.com>\n\t<20210309063829.8710-3-dafna.hirschfeld@collabora.com>\n\t<YEf1l9yzi3boLt+1@pendragon.ideasonboard.com>\n\t<1d1a47f2-0135-b266-a852-d4f1a9e8059c@collabora.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<1d1a47f2-0135-b266-a852-d4f1a9e8059c@collabora.com>","Subject":"Re: [libcamera-devel] [PATCH v3 2/3] src: rkisp1: return error from\n\tipa's configure method if it fails","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>","Cc":"libcamera-devel@lists.libcamera.org, kernel@collabora.com","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]