[{"id":25403,"web_url":"https://patchwork.libcamera.org/comment/25403/","msgid":"<20221012134146.n6em7umhtxlr5etv@uno.localdomain>","date":"2022-10-12T13:41:46","subject":"Re: [libcamera-devel] [PATCH v5 6/9] ipa: vimc: Add\n\tIPAOperationCode to init() parameter list","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"I understand the VIMC IPA doesn't do anything useful per se, but it\nseems we're using it as test module rather than a skeleton IPA.\n\nIOW do we need this if enum serialization is already tested ? Won't it\nconfuse IPA implementer that might look into VIMC as a reference ?\n\nOn Tue, Oct 11, 2022 at 07:58:56PM +0900, Paul Elder via libcamera-devel wrote:\n> For the purpose of testing serializing/deserializing enums in function\n> parameters, add IPAOperationCode to the parameter list of init().\n>\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n> ---\n> No change in v5\n>\n> Changes in v4:\n> - remove [TEST] from commit subject\n>\n> Changes in v3:\n> - pass enum by value as opposed to by const reference\n>\n> No changes in v2\n> ---\n>  include/libcamera/ipa/vimc.mojom     | 2 +-\n>  src/ipa/vimc/vimc.cpp                | 6 ++++--\n>  src/libcamera/pipeline/vimc/vimc.cpp | 2 +-\n>  test/ipa/ipa_interface_test.cpp      | 2 +-\n>  4 files changed, 7 insertions(+), 5 deletions(-)\n>\n> diff --git a/include/libcamera/ipa/vimc.mojom b/include/libcamera/ipa/vimc.mojom\n> index 718b9674..16149787 100644\n> --- a/include/libcamera/ipa/vimc.mojom\n> +++ b/include/libcamera/ipa/vimc.mojom\n> @@ -18,7 +18,7 @@ enum IPAOperationCode {\n>  };\n>\n>  interface IPAVimcInterface {\n> -\tinit(libcamera.IPASettings settings) => (int32 ret);\n> +\tinit(libcamera.IPASettings settings, IPAOperationCode code) => (int32 ret);\n>\n>  \tconfigure(libcamera.IPACameraSensorInfo sensorInfo,\n>  \t\t  map<uint32, libcamera.IPAStream> streamConfig,\n> diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp\n> index 85afb279..5d494b63 100644\n> --- a/src/ipa/vimc/vimc.cpp\n> +++ b/src/ipa/vimc/vimc.cpp\n> @@ -31,7 +31,7 @@ public:\n>  \tIPAVimc();\n>  \t~IPAVimc();\n>\n> -\tint init(const IPASettings &settings) override;\n> +\tint init(const IPASettings &settings, const ipa::vimc::IPAOperationCode code) override;\n>\n>  \tint start() override;\n>  \tvoid stop() override;\n> @@ -66,7 +66,7 @@ IPAVimc::~IPAVimc()\n>  \t\t::close(fd_);\n>  }\n>\n> -int IPAVimc::init(const IPASettings &settings)\n> +int IPAVimc::init(const IPASettings &settings, const ipa::vimc::IPAOperationCode code)\n>  {\n>  \ttrace(ipa::vimc::IPAOperationInit);\n>\n> @@ -74,6 +74,8 @@ int IPAVimc::init(const IPASettings &settings)\n>  \t\t<< \"initializing vimc IPA with configuration file \"\n>  \t\t<< settings.configurationFile;\n>\n> +\tLOG(IPAVimc, Debug) << \"Got opcode \" << code;\n> +\n>  \tFile conf(settings.configurationFile);\n>  \tif (!conf.open(File::OpenModeFlag::ReadOnly)) {\n>  \t\tLOG(IPAVimc, Error) << \"Failed to open configuration file\";\n> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\n> index d2f2e460..df749bf7 100644\n> --- a/src/libcamera/pipeline/vimc/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc/vimc.cpp\n> @@ -471,7 +471,7 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)\n>  \tdata->ipa_->paramsBufferReady.connect(data.get(), &VimcCameraData::paramsBufferReady);\n>\n>  \tstd::string conf = data->ipa_->configurationFile(\"vimc.conf\");\n> -\tdata->ipa_->init(IPASettings{ conf, data->sensor_->model() });\n> +\tdata->ipa_->init(IPASettings{ conf, data->sensor_->model() }, ipa::vimc::IPAOperationInit);\n>\n>  \t/* Create and register the camera. */\n>  \tstd::set<Stream *> streams{ &data->stream_ };\n> diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp\n> index 6b93e976..cd20348a 100644\n> --- a/test/ipa/ipa_interface_test.cpp\n> +++ b/test/ipa/ipa_interface_test.cpp\n> @@ -106,7 +106,7 @@ protected:\n>\n>  \t\t/* Test initialization of IPA module. */\n>  \t\tstd::string conf = ipa_->configurationFile(\"vimc.conf\");\n> -\t\tint ret = ipa_->init(IPASettings{ conf, \"vimc\" });\n> +\t\tint ret = ipa_->init(IPASettings{ conf, \"vimc\" }, ipa::vimc::IPAOperationInit);\n>  \t\tif (ret < 0) {\n>  \t\t\tcerr << \"IPA interface init() failed\" << endl;\n>  \t\t\treturn TestFail;\n> --\n> 2.30.2\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 EE2D8BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 12 Oct 2022 13:41:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 59D0362D9D;\n\tWed, 12 Oct 2022 15:41:49 +0200 (CEST)","from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::224])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 19EAA603D7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Oct 2022 15:41:48 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 96451E000C;\n\tWed, 12 Oct 2022 13:41:47 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665582109;\n\tbh=NqF+2xUY30WcVTnkM+1tsoza9LSDWjdFGd8Xct/HDlw=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=qK7EGYT8wVHbH4ZeYwlCjX+YS3um/aW3S5lZIU8akw3ozvVFTiBj9EU8getvTzlC/\n\tt2Vqqn9rUnFHsjzHfdxeZDqFFUm1qagQ6wTFEyxeJvNHTeBOPKG4l9N5NcWADM8Yxq\n\td0JgnECOweC0Oh8Ie4nshhx758YMGushE8v6HM8QC2rI9JHN0qBVAckLxWpJOGkyLF\n\tKFQij/d1VNjLbCiunC6+D86P0uYAtfqrqd/1OKKrle+jCurjY8GxUnAqDE+pBb2mpi\n\tY0vtxQnMpWO8qwu0Gw+0Px1YOci2OAinzuRIzGgznYqtgVCz0YVCcQWwuns0zaieXc\n\tv48+FJoUfPKvg==","Date":"Wed, 12 Oct 2022 15:41:46 +0200","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<20221012134146.n6em7umhtxlr5etv@uno.localdomain>","References":"<20221011105859.457567-1-paul.elder@ideasonboard.com>\n\t<20221011105859.457567-7-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20221011105859.457567-7-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v5 6/9] ipa: vimc: Add\n\tIPAOperationCode to init() parameter list","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25425,"web_url":"https://patchwork.libcamera.org/comment/25425/","msgid":"<Y0toZvhBl9dvTAzB@pendragon.ideasonboard.com>","date":"2022-10-16T02:11:50","subject":"Re: [libcamera-devel] [PATCH v5 6/9] ipa: vimc: Add\n\tIPAOperationCode to init() parameter list","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Wed, Oct 12, 2022 at 03:41:46PM +0200, Jacopo Mondi via libcamera-devel wrote:\n> I understand the VIMC IPA doesn't do anything useful per se, but it\n> seems we're using it as test module rather than a skeleton IPA.\n> \n> IOW do we need this if enum serialization is already tested ? Won't it\n> confuse IPA implementer that might look into VIMC as a reference ?\n\nUnless I'm mistaken, we don't have any other test for enums in function\nparameters. I think we could implement a test that wouldn't require vimc\nand would instead implement everything in the test itself, but that\nwould be lots of code. We've used vimc for the purpose of testing the\nIPA interface, so I don't see this as a new issue. I however agree that\nit would be nice if we could clean up the vimc IPA interface and bring\nit closer to something real, while keeping the features we need for\ntests.\n\n> On Tue, Oct 11, 2022 at 07:58:56PM +0900, Paul Elder via libcamera-devel wrote:\n> > For the purpose of testing serializing/deserializing enums in function\n> > parameters, add IPAOperationCode to the parameter list of init().\n> >\n> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >\n> > ---\n> > No change in v5\n> >\n> > Changes in v4:\n> > - remove [TEST] from commit subject\n> >\n> > Changes in v3:\n> > - pass enum by value as opposed to by const reference\n> >\n> > No changes in v2\n> > ---\n> >  include/libcamera/ipa/vimc.mojom     | 2 +-\n> >  src/ipa/vimc/vimc.cpp                | 6 ++++--\n> >  src/libcamera/pipeline/vimc/vimc.cpp | 2 +-\n> >  test/ipa/ipa_interface_test.cpp      | 2 +-\n> >  4 files changed, 7 insertions(+), 5 deletions(-)\n> >\n> > diff --git a/include/libcamera/ipa/vimc.mojom b/include/libcamera/ipa/vimc.mojom\n> > index 718b9674..16149787 100644\n> > --- a/include/libcamera/ipa/vimc.mojom\n> > +++ b/include/libcamera/ipa/vimc.mojom\n> > @@ -18,7 +18,7 @@ enum IPAOperationCode {\n> >  };\n> >\n> >  interface IPAVimcInterface {\n> > -\tinit(libcamera.IPASettings settings) => (int32 ret);\n> > +\tinit(libcamera.IPASettings settings, IPAOperationCode code) => (int32 ret);\n> >\n> >  \tconfigure(libcamera.IPACameraSensorInfo sensorInfo,\n> >  \t\t  map<uint32, libcamera.IPAStream> streamConfig,\n> > diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp\n> > index 85afb279..5d494b63 100644\n> > --- a/src/ipa/vimc/vimc.cpp\n> > +++ b/src/ipa/vimc/vimc.cpp\n> > @@ -31,7 +31,7 @@ public:\n> >  \tIPAVimc();\n> >  \t~IPAVimc();\n> >\n> > -\tint init(const IPASettings &settings) override;\n> > +\tint init(const IPASettings &settings, const ipa::vimc::IPAOperationCode code) override;\n> >\n> >  \tint start() override;\n> >  \tvoid stop() override;\n> > @@ -66,7 +66,7 @@ IPAVimc::~IPAVimc()\n> >  \t\t::close(fd_);\n> >  }\n> >\n> > -int IPAVimc::init(const IPASettings &settings)\n> > +int IPAVimc::init(const IPASettings &settings, const ipa::vimc::IPAOperationCode code)\n> >  {\n> >  \ttrace(ipa::vimc::IPAOperationInit);\n> >\n> > @@ -74,6 +74,8 @@ int IPAVimc::init(const IPASettings &settings)\n> >  \t\t<< \"initializing vimc IPA with configuration file \"\n> >  \t\t<< settings.configurationFile;\n> >\n> > +\tLOG(IPAVimc, Debug) << \"Got opcode \" << code;\n> > +\n> >  \tFile conf(settings.configurationFile);\n> >  \tif (!conf.open(File::OpenModeFlag::ReadOnly)) {\n> >  \t\tLOG(IPAVimc, Error) << \"Failed to open configuration file\";\n> > diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\n> > index d2f2e460..df749bf7 100644\n> > --- a/src/libcamera/pipeline/vimc/vimc.cpp\n> > +++ b/src/libcamera/pipeline/vimc/vimc.cpp\n> > @@ -471,7 +471,7 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)\n> >  \tdata->ipa_->paramsBufferReady.connect(data.get(), &VimcCameraData::paramsBufferReady);\n> >\n> >  \tstd::string conf = data->ipa_->configurationFile(\"vimc.conf\");\n> > -\tdata->ipa_->init(IPASettings{ conf, data->sensor_->model() });\n> > +\tdata->ipa_->init(IPASettings{ conf, data->sensor_->model() }, ipa::vimc::IPAOperationInit);\n> >\n> >  \t/* Create and register the camera. */\n> >  \tstd::set<Stream *> streams{ &data->stream_ };\n> > diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp\n> > index 6b93e976..cd20348a 100644\n> > --- a/test/ipa/ipa_interface_test.cpp\n> > +++ b/test/ipa/ipa_interface_test.cpp\n> > @@ -106,7 +106,7 @@ protected:\n> >\n> >  \t\t/* Test initialization of IPA module. */\n> >  \t\tstd::string conf = ipa_->configurationFile(\"vimc.conf\");\n> > -\t\tint ret = ipa_->init(IPASettings{ conf, \"vimc\" });\n> > +\t\tint ret = ipa_->init(IPASettings{ conf, \"vimc\" }, ipa::vimc::IPAOperationInit);\n> >  \t\tif (ret < 0) {\n> >  \t\t\tcerr << \"IPA interface init() failed\" << endl;\n> >  \t\t\treturn TestFail;","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 D993DBD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 16 Oct 2022 02:12:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4188E62DD9;\n\tSun, 16 Oct 2022 04:12:15 +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 A0130603D1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 16 Oct 2022 04:12:13 +0200 (CEST)","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 DE99230A;\n\tSun, 16 Oct 2022 04:12:12 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665886335;\n\tbh=zi0cJDZuzNTCUAOSw842PhQuz6BzqRSv5nyOg3yNqKA=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=hvUDhIy8YB8r/pu9Of67eEg7UZadr3oU2b0zEWZjta7eGXiArm+7uMOvL2G060DL6\n\tPA/1NJqhzvcovYrqasEmn3BBf1f4GwPIrrVOEw29B7dsKnKMtC4xZS1lzSNqkcvD2F\n\tUeXN7twJIxeXLKxCvREgEv6svlTwxd/WUJzheu6T+XLNnushWnf96/SwukyNRR5ekP\n\tFAcmQMs1WcZhJp07V9tk7MijbEvTdmQxKiAeDuO0sbbMhx903pWJInX/hjSvoVDGC+\n\toVHgD3zD0ZDA85BJCOy0C7w/abNP6i6oHWPiIctwQEFCywaGsCk+wDA/PGVuixgvzR\n\t48eDbq0wb74mQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1665886333;\n\tbh=zi0cJDZuzNTCUAOSw842PhQuz6BzqRSv5nyOg3yNqKA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=OjQTsMUginT8LuU+heXFNktgK4aVLF2i/sZDUnJMFpVlFEyKe8ZHZLF5T+PRUMnAR\n\tIX8vtsruVXxsZ57ePRMSpdXDGex0FqBDshHvm15oehsNBl612jmoBaue4ADxBNpNSD\n\tKFuEP4vUpwb2k+C5fHRw0floLuxN3q735Dx9sRik="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"OjQTsMUg\"; dkim-atps=neutral","Date":"Sun, 16 Oct 2022 05:11:50 +0300","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<Y0toZvhBl9dvTAzB@pendragon.ideasonboard.com>","References":"<20221011105859.457567-1-paul.elder@ideasonboard.com>\n\t<20221011105859.457567-7-paul.elder@ideasonboard.com>\n\t<20221012134146.n6em7umhtxlr5etv@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20221012134146.n6em7umhtxlr5etv@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH v5 6/9] ipa: vimc: Add\n\tIPAOperationCode to init() parameter list","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25448,"web_url":"https://patchwork.libcamera.org/comment/25448/","msgid":"<20221018091704.GE3814735@pyrite.rasen.tech>","date":"2022-10-18T09:17:04","subject":"Re: [libcamera-devel] [PATCH v5 6/9] ipa: vimc: Add\n\tIPAOperationCode to init() parameter list","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"On Sun, Oct 16, 2022 at 05:11:50AM +0300, Laurent Pinchart wrote:\n> On Wed, Oct 12, 2022 at 03:41:46PM +0200, Jacopo Mondi via libcamera-devel wrote:\n> > I understand the VIMC IPA doesn't do anything useful per se, but it\n> > seems we're using it as test module rather than a skeleton IPA.\n> > \n> > IOW do we need this if enum serialization is already tested ? Won't it\n> > confuse IPA implementer that might look into VIMC as a reference ?\n> \n> Unless I'm mistaken, we don't have any other test for enums in function\n> parameters. I think we could implement a test that wouldn't require vimc\n\nYeah, that's the deal; we don't otherwise have a test for enums and\nflags in function parameters.\n\n\nPaul\n\n> and would instead implement everything in the test itself, but that\n> would be lots of code. We've used vimc for the purpose of testing the\n> IPA interface, so I don't see this as a new issue. I however agree that\n> it would be nice if we could clean up the vimc IPA interface and bring\n> it closer to something real, while keeping the features we need for\n> tests.\n> \n> > On Tue, Oct 11, 2022 at 07:58:56PM +0900, Paul Elder via libcamera-devel wrote:\n> > > For the purpose of testing serializing/deserializing enums in function\n> > > parameters, add IPAOperationCode to the parameter list of init().\n> > >\n> > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > >\n> > > ---\n> > > No change in v5\n> > >\n> > > Changes in v4:\n> > > - remove [TEST] from commit subject\n> > >\n> > > Changes in v3:\n> > > - pass enum by value as opposed to by const reference\n> > >\n> > > No changes in v2\n> > > ---\n> > >  include/libcamera/ipa/vimc.mojom     | 2 +-\n> > >  src/ipa/vimc/vimc.cpp                | 6 ++++--\n> > >  src/libcamera/pipeline/vimc/vimc.cpp | 2 +-\n> > >  test/ipa/ipa_interface_test.cpp      | 2 +-\n> > >  4 files changed, 7 insertions(+), 5 deletions(-)\n> > >\n> > > diff --git a/include/libcamera/ipa/vimc.mojom b/include/libcamera/ipa/vimc.mojom\n> > > index 718b9674..16149787 100644\n> > > --- a/include/libcamera/ipa/vimc.mojom\n> > > +++ b/include/libcamera/ipa/vimc.mojom\n> > > @@ -18,7 +18,7 @@ enum IPAOperationCode {\n> > >  };\n> > >\n> > >  interface IPAVimcInterface {\n> > > -\tinit(libcamera.IPASettings settings) => (int32 ret);\n> > > +\tinit(libcamera.IPASettings settings, IPAOperationCode code) => (int32 ret);\n> > >\n> > >  \tconfigure(libcamera.IPACameraSensorInfo sensorInfo,\n> > >  \t\t  map<uint32, libcamera.IPAStream> streamConfig,\n> > > diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp\n> > > index 85afb279..5d494b63 100644\n> > > --- a/src/ipa/vimc/vimc.cpp\n> > > +++ b/src/ipa/vimc/vimc.cpp\n> > > @@ -31,7 +31,7 @@ public:\n> > >  \tIPAVimc();\n> > >  \t~IPAVimc();\n> > >\n> > > -\tint init(const IPASettings &settings) override;\n> > > +\tint init(const IPASettings &settings, const ipa::vimc::IPAOperationCode code) override;\n> > >\n> > >  \tint start() override;\n> > >  \tvoid stop() override;\n> > > @@ -66,7 +66,7 @@ IPAVimc::~IPAVimc()\n> > >  \t\t::close(fd_);\n> > >  }\n> > >\n> > > -int IPAVimc::init(const IPASettings &settings)\n> > > +int IPAVimc::init(const IPASettings &settings, const ipa::vimc::IPAOperationCode code)\n> > >  {\n> > >  \ttrace(ipa::vimc::IPAOperationInit);\n> > >\n> > > @@ -74,6 +74,8 @@ int IPAVimc::init(const IPASettings &settings)\n> > >  \t\t<< \"initializing vimc IPA with configuration file \"\n> > >  \t\t<< settings.configurationFile;\n> > >\n> > > +\tLOG(IPAVimc, Debug) << \"Got opcode \" << code;\n> > > +\n> > >  \tFile conf(settings.configurationFile);\n> > >  \tif (!conf.open(File::OpenModeFlag::ReadOnly)) {\n> > >  \t\tLOG(IPAVimc, Error) << \"Failed to open configuration file\";\n> > > diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\n> > > index d2f2e460..df749bf7 100644\n> > > --- a/src/libcamera/pipeline/vimc/vimc.cpp\n> > > +++ b/src/libcamera/pipeline/vimc/vimc.cpp\n> > > @@ -471,7 +471,7 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)\n> > >  \tdata->ipa_->paramsBufferReady.connect(data.get(), &VimcCameraData::paramsBufferReady);\n> > >\n> > >  \tstd::string conf = data->ipa_->configurationFile(\"vimc.conf\");\n> > > -\tdata->ipa_->init(IPASettings{ conf, data->sensor_->model() });\n> > > +\tdata->ipa_->init(IPASettings{ conf, data->sensor_->model() }, ipa::vimc::IPAOperationInit);\n> > >\n> > >  \t/* Create and register the camera. */\n> > >  \tstd::set<Stream *> streams{ &data->stream_ };\n> > > diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp\n> > > index 6b93e976..cd20348a 100644\n> > > --- a/test/ipa/ipa_interface_test.cpp\n> > > +++ b/test/ipa/ipa_interface_test.cpp\n> > > @@ -106,7 +106,7 @@ protected:\n> > >\n> > >  \t\t/* Test initialization of IPA module. */\n> > >  \t\tstd::string conf = ipa_->configurationFile(\"vimc.conf\");\n> > > -\t\tint ret = ipa_->init(IPASettings{ conf, \"vimc\" });\n> > > +\t\tint ret = ipa_->init(IPASettings{ conf, \"vimc\" }, ipa::vimc::IPAOperationInit);\n> > >  \t\tif (ret < 0) {\n> > >  \t\t\tcerr << \"IPA interface init() failed\" << endl;\n> > >  \t\t\treturn TestFail;\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","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 25AC8BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 18 Oct 2022 09:17:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6024362E16;\n\tTue, 18 Oct 2022 11:17:13 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4A79062DD1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 18 Oct 2022 11:17:12 +0200 (CEST)","from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 69B77491;\n\tTue, 18 Oct 2022 11:17:10 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666084633;\n\tbh=ZZ34qsRrk/Qy6fcDfCWRfwWR8jhWmuErd8mxKdSzPnI=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=U1PIi4b7j/71ZVE1ZawObMqHnYUPR80uZfi0ZtvD/GYYBp5uyF8EXyGxBdNp4vLh+\n\ttAFmjVER8OFO+wAgZyoNk/xa9k8BCUdLQUkuhHAgUlBVO/gl0vUCLbYhd+QaByujLK\n\tZkRlosKCP6hD+jW9jjZSVZvDa4IJV5M5fHAgWTA7Hw1TU3b4a0bL+sUlDEyDmQjFdy\n\tKAOprzlyAADvO80WZFFlqtSY0yTY02obe1+1ibIo+pvibtoAtCa9mo3JgLUvhdMDij\n\tEYpMQGD7q6Y72e2OgF64DjbRBi1MhMnohRPlxZsUM461eZ6+lY+i+JzJf1uY2boIQh\n\tq1KQNT/yMV8kA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1666084631;\n\tbh=ZZ34qsRrk/Qy6fcDfCWRfwWR8jhWmuErd8mxKdSzPnI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=HidRqih+TFE5PQ5LNssvSd2mdbfzTj9YznNr+q0R5ek4njy25Dq5OubvG+e5pC8mM\n\tuJ8mWR3uaSacnNwoSlR+XqClSfWbI3fJTlibDBPsp9FSu9V2Sh2Icz3/xNBFNeBZno\n\tkL98GEgH3f3rK5P0+kBd7jNCaYk42fg5JMdLpZcQ="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"HidRqih+\"; dkim-atps=neutral","Date":"Tue, 18 Oct 2022 18:17:04 +0900","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20221018091704.GE3814735@pyrite.rasen.tech>","References":"<20221011105859.457567-1-paul.elder@ideasonboard.com>\n\t<20221011105859.457567-7-paul.elder@ideasonboard.com>\n\t<20221012134146.n6em7umhtxlr5etv@uno.localdomain>\n\t<Y0toZvhBl9dvTAzB@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<Y0toZvhBl9dvTAzB@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v5 6/9] ipa: vimc: Add\n\tIPAOperationCode to init() parameter list","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>","From":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"paul.elder@ideasonboard.com","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]