[{"id":14877,"web_url":"https://patchwork.libcamera.org/comment/14877/","msgid":"<20210201105349.zd2n2f3bmsgbztow@uno.localdomain>","date":"2021-02-01T10:53:49","subject":"Re: [libcamera-devel] [PATCH] pipeline: ipa: raspberrypi:\n\tRationalise use of RPi::ConfigParameters","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Naush\n\nOn Sat, Jan 30, 2021 at 11:16:51AM +0000, Naushir Patuck wrote:\n> Rename the enum values to indicate pipeline handler -> IPA actions\n> (IPA_CONFIG_*) and IPA -> pipeline handler return results (IPA_RESULT_*).\n> Additionally, provide more descriptive names for these values.\n\nThis part is ok, make naming more clear\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\n>\n> Fixup logic when handling IPA_RESULT_SENSOR_PARAMS where we must\n> overwrite the parameters if provided by IPA. In the current codebase,\n> this only happens once on startup, so there is no effective functional\n> difference. But this change allows the option for the IPA to request new\n> sensor parameters per-mode if required.\n\nThis seems it's worth a separate patch, as it does not depends on\nrenaming but it's rather a change in behaviour which it would probably\nbetter be separate.\n\nIf I got this right you refer to 'parameters' in the commit message\nhere to indicate the controls delay could be overwritten at each\nconfigureIPA() am I right ? Out of curiosity, how does the sensor mode\nchange impact on the control delay ?\n\nThanks\n  j\n\n\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  include/libcamera/ipa/raspberrypi.h           | 10 +++---\n>  src/ipa/raspberrypi/raspberrypi.cpp           | 18 +++++------\n>  .../pipeline/raspberrypi/raspberrypi.cpp      | 31 +++++++++----------\n>  3 files changed, 28 insertions(+), 31 deletions(-)\n>\n> diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\n> index 5a9433825d5a..970b9e931188 100644\n> --- a/include/libcamera/ipa/raspberrypi.h\n> +++ b/include/libcamera/ipa/raspberrypi.h\n> @@ -20,11 +20,11 @@ namespace RPi {\n>\n>  enum ConfigParameters {\n>  \tIPA_CONFIG_LS_TABLE = (1 << 0),\n> -\tIPA_CONFIG_STAGGERED_WRITE = (1 << 1),\n> -\tIPA_CONFIG_SENSOR = (1 << 2),\n> -\tIPA_CONFIG_DROP_FRAMES = (1 << 3),\n> -\tIPA_CONFIG_FAILED = (1 << 4),\n> -\tIPA_CONFIG_STARTUP = (1 << 5),\n> +\tIPA_CONFIG_STARTUP_CTRLS = (1 << 1),\n> +\tIPA_RESULT_CONFIG_FAILED = (1 << 2),\n> +\tIPA_RESULT_SENSOR_PARAMS = (1 << 3),\n> +\tIPA_RESULT_SENSOR_CTRLS = (1 << 4),\n> +\tIPA_RESULT_DROP_FRAMES = (1 << 5),\n>  };\n>\n>  enum Operations {\n> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> index 681ab9211b7c..fea1ea3957bb 100644\n> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> @@ -170,7 +170,7 @@ int IPARPi::start(const IPAOperationData &data, IPAOperationData *result)\n>\n>  \tASSERT(result);\n>  \tresult->operation = 0;\n> -\tif (data.operation & RPi::IPA_CONFIG_STARTUP) {\n> +\tif (data.operation & RPi::IPA_CONFIG_STARTUP_CTRLS) {\n>  \t\t/* We have been given some controls to action before start. */\n>  \t\tqueueRequest(data.controls[0]);\n>  \t}\n> @@ -188,7 +188,7 @@ int IPARPi::start(const IPAOperationData &data, IPAOperationData *result)\n>  \t\tControlList ctrls(sensorCtrls_);\n>  \t\tapplyAGC(&agcStatus, ctrls);\n>  \t\tresult->controls.emplace_back(ctrls);\n> -\t\tresult->operation |= RPi::IPA_CONFIG_SENSOR;\n> +\t\tresult->operation |= RPi::IPA_RESULT_SENSOR_CTRLS;\n>  \t}\n>\n>  \t/*\n> @@ -236,7 +236,7 @@ int IPARPi::start(const IPAOperationData &data, IPAOperationData *result)\n>  \t}\n>\n>  \tresult->data.push_back(dropFrame);\n> -\tresult->operation |= RPi::IPA_CONFIG_DROP_FRAMES;\n> +\tresult->operation |= RPi::IPA_RESULT_DROP_FRAMES;\n>\n>  \tfirstStart_ = false;\n>\n> @@ -289,7 +289,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n>  {\n>  \tif (entityControls.size() != 2) {\n>  \t\tLOG(IPARPI, Error) << \"No ISP or sensor controls found.\";\n> -\t\tresult->operation = RPi::IPA_CONFIG_FAILED;\n> +\t\tresult->operation = RPi::IPA_RESULT_CONFIG_FAILED;\n>  \t\treturn;\n>  \t}\n>\n> @@ -300,13 +300,13 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n>\n>  \tif (!validateSensorControls()) {\n>  \t\tLOG(IPARPI, Error) << \"Sensor control validation failed.\";\n> -\t\tresult->operation = RPi::IPA_CONFIG_FAILED;\n> +\t\tresult->operation = RPi::IPA_RESULT_CONFIG_FAILED;\n>  \t\treturn;\n>  \t}\n>\n>  \tif (!validateIspControls()) {\n>  \t\tLOG(IPARPI, Error) << \"ISP control validation failed.\";\n> -\t\tresult->operation = RPi::IPA_CONFIG_FAILED;\n> +\t\tresult->operation = RPi::IPA_RESULT_CONFIG_FAILED;\n>  \t\treturn;\n>  \t}\n>\n> @@ -325,7 +325,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n>  \t\tif (!helper_) {\n>  \t\t\tLOG(IPARPI, Error) << \"Could not create camera helper for \"\n>  \t\t\t\t\t   << cameraName;\n> -\t\t\tresult->operation = RPi::IPA_CONFIG_FAILED;\n> +\t\t\tresult->operation = RPi::IPA_RESULT_CONFIG_FAILED;\n>  \t\t\treturn;\n>  \t\t}\n>\n> @@ -342,7 +342,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n>  \t\tresult->data.push_back(exposureDelay); /* For VBLANK ctrl */\n>  \t\tresult->data.push_back(sensorMetadata);\n>\n> -\t\tresult->operation |= RPi::IPA_CONFIG_STAGGERED_WRITE;\n> +\t\tresult->operation |= RPi::IPA_RESULT_SENSOR_PARAMS;\n>  \t}\n>\n>  \t/* Re-assemble camera mode using the sensor info. */\n> @@ -395,7 +395,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n>  \t\tapplyAGC(&agcStatus, ctrls);\n>\n>  \t\tresult->controls.emplace_back(ctrls);\n> -\t\tresult->operation |= RPi::IPA_CONFIG_SENSOR;\n> +\t\tresult->operation |= RPi::IPA_RESULT_SENSOR_CTRLS;\n>  \t}\n>\n>  \tlastMode_ = mode_;\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 5ad12d99638f..c44cb437a596 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -753,7 +753,7 @@ int PipelineHandlerRPi::start(Camera *camera, [[maybe_unused]] ControlList *cont\n>  \tIPAOperationData ipaData = {};\n>  \tIPAOperationData result = {};\n>  \tif (controls) {\n> -\t\tipaData.operation = RPi::IPA_CONFIG_STARTUP;\n> +\t\tipaData.operation = RPi::IPA_CONFIG_STARTUP_CTRLS;\n>  \t\tipaData.controls.emplace_back(*controls);\n>  \t}\n>  \tret = data->ipa_->start(ipaData, &result);\n> @@ -765,12 +765,12 @@ int PipelineHandlerRPi::start(Camera *camera, [[maybe_unused]] ControlList *cont\n>  \t}\n>\n>  \t/* Apply any gain/exposure settings that the IPA may have passed back. */\n> -\tif (result.operation & RPi::IPA_CONFIG_SENSOR) {\n> +\tif (result.operation & RPi::IPA_RESULT_SENSOR_CTRLS) {\n>  \t\tControlList &ctrls = result.controls[0];\n>  \t\tdata->unicam_[Unicam::Image].dev()->setControls(&ctrls);\n>  \t}\n>\n> -\tif (result.operation & RPi::IPA_CONFIG_DROP_FRAMES) {\n> +\tif (result.operation & RPi::IPA_RESULT_DROP_FRAMES) {\n>  \t\t/* Configure the number of dropped frames required on startup. */\n>  \t\tdata->dropFrameCount_ = result.data[0];\n>  \t}\n> @@ -1213,31 +1213,28 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n>  \tipa_->configure(sensorInfo_, streamConfig, entityControls, ipaConfig,\n>  \t\t\t&result);\n>\n> -\tif (result.operation & RPi::IPA_CONFIG_FAILED) {\n> +\tif (result.operation & RPi::IPA_RESULT_CONFIG_FAILED) {\n>  \t\tLOG(RPI, Error) << \"IPA configuration failed!\";\n>  \t\treturn -EPIPE;\n>  \t}\n>\n>  \tunsigned int resultIdx = 0;\n> -\tif (result.operation & RPi::IPA_CONFIG_STAGGERED_WRITE) {\n> +\tif (result.operation & RPi::IPA_RESULT_SENSOR_PARAMS) {\n>  \t\t/*\n>  \t\t * Setup our delayed control writer with the sensor default\n>  \t\t * gain and exposure delays.\n>  \t\t */\n> -\t\tif (!delayedCtrls_) {\n> -\t\t\tstd::unordered_map<uint32_t, unsigned int> delays = {\n> -\t\t\t\t{ V4L2_CID_ANALOGUE_GAIN, result.data[resultIdx++] },\n> -\t\t\t\t{ V4L2_CID_EXPOSURE, result.data[resultIdx++] },\n> -\t\t\t\t{ V4L2_CID_VBLANK, result.data[resultIdx++] }\n> -\t\t\t};\n> -\n> -\t\t\tdelayedCtrls_ = std::make_unique<DelayedControls>(unicam_[Unicam::Image].dev(), delays);\n> -\n> -\t\t\tsensorMetadata_ = result.data[resultIdx++];\n> -\t\t}\n> +\t\tstd::unordered_map<uint32_t, unsigned int> delays = {\n> +\t\t\t{ V4L2_CID_ANALOGUE_GAIN, result.data[resultIdx++] },\n> +\t\t\t{ V4L2_CID_EXPOSURE, result.data[resultIdx++] },\n> +\t\t\t{ V4L2_CID_VBLANK, result.data[resultIdx++] }\n> +\t\t};\n> +\n> +\t\tdelayedCtrls_ = std::make_unique<DelayedControls>(unicam_[Unicam::Image].dev(), delays);\n> +\t\tsensorMetadata_ = result.data[resultIdx++];\n>  \t}\n>\n> -\tif (result.operation & RPi::IPA_CONFIG_SENSOR) {\n> +\tif (result.operation & RPi::IPA_RESULT_SENSOR_CTRLS) {\n>  \t\tControlList &ctrls = result.controls[0];\n>  \t\tunicam_[Unicam::Image].dev()->setControls(&ctrls);\n>  \t}\n> --\n> 2.25.1\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 23E01BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Feb 2021 10:53:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A620468400;\n\tMon,  1 Feb 2021 11:53:29 +0100 (CET)","from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net\n\t[217.70.183.198])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 334F460307\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Feb 2021 11:53:28 +0100 (CET)","from uno.localdomain (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 9CBD0C000E;\n\tMon,  1 Feb 2021 10:53:27 +0000 (UTC)"],"X-Originating-IP":"93.61.96.190","Date":"Mon, 1 Feb 2021 11:53:49 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20210201105349.zd2n2f3bmsgbztow@uno.localdomain>","References":"<20210130111651.1073981-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210130111651.1073981-1-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH] pipeline: ipa: raspberrypi:\n\tRationalise use of RPi::ConfigParameters","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","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":14881,"web_url":"https://patchwork.libcamera.org/comment/14881/","msgid":"<CAEmqJPpncdTVsoAE-g0LQ69t4RJw-d3KODkebseDwz1D0UVDWg@mail.gmail.com>","date":"2021-02-01T12:41:42","subject":"Re: [libcamera-devel] [PATCH] pipeline: ipa: raspberrypi:\n\tRationalise use of RPi::ConfigParameters","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Jacopo,\n\nThank you for your review feedback.\n\nOn Mon, 1 Feb 2021 at 10:53, Jacopo Mondi <jacopo@jmondi.org> wrote:\n\n> Hi Naush\n>\n> On Sat, Jan 30, 2021 at 11:16:51AM +0000, Naushir Patuck wrote:\n> > Rename the enum values to indicate pipeline handler -> IPA actions\n> > (IPA_CONFIG_*) and IPA -> pipeline handler return results (IPA_RESULT_*).\n> > Additionally, provide more descriptive names for these values.\n>\n> This part is ok, make naming more clear\n> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n>\n> >\n> > Fixup logic when handling IPA_RESULT_SENSOR_PARAMS where we must\n> > overwrite the parameters if provided by IPA. In the current codebase,\n> > this only happens once on startup, so there is no effective functional\n> > difference. But this change allows the option for the IPA to request new\n> > sensor parameters per-mode if required.\n>\n> This seems it's worth a separate patch, as it does not depends on\n> renaming but it's rather a change in behaviour which it would probably\n> better be separate.\n>\n\nAck. I can separate these out into 2 patches.  Will post an update shortly.\n\n\n>\n> If I got this right you refer to 'parameters' in the commit message\n> here to indicate the controls delay could be overwritten at each\n> configureIPA() am I right ? Out of curiosity, how does the sensor mode\n> change impact on the control delay ?\n>\n\nIn almost all cases it won't.  However, I have sensors that will disable\nembedded data in certain modes, but again, this is very rare.\n\nRegards,\nNaush\n\n\n\n>\n> Thanks\n>   j\n>\n>\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  include/libcamera/ipa/raspberrypi.h           | 10 +++---\n> >  src/ipa/raspberrypi/raspberrypi.cpp           | 18 +++++------\n> >  .../pipeline/raspberrypi/raspberrypi.cpp      | 31 +++++++++----------\n> >  3 files changed, 28 insertions(+), 31 deletions(-)\n> >\n> > diff --git a/include/libcamera/ipa/raspberrypi.h\n> b/include/libcamera/ipa/raspberrypi.h\n> > index 5a9433825d5a..970b9e931188 100644\n> > --- a/include/libcamera/ipa/raspberrypi.h\n> > +++ b/include/libcamera/ipa/raspberrypi.h\n> > @@ -20,11 +20,11 @@ namespace RPi {\n> >\n> >  enum ConfigParameters {\n> >       IPA_CONFIG_LS_TABLE = (1 << 0),\n> > -     IPA_CONFIG_STAGGERED_WRITE = (1 << 1),\n> > -     IPA_CONFIG_SENSOR = (1 << 2),\n> > -     IPA_CONFIG_DROP_FRAMES = (1 << 3),\n> > -     IPA_CONFIG_FAILED = (1 << 4),\n> > -     IPA_CONFIG_STARTUP = (1 << 5),\n> > +     IPA_CONFIG_STARTUP_CTRLS = (1 << 1),\n> > +     IPA_RESULT_CONFIG_FAILED = (1 << 2),\n> > +     IPA_RESULT_SENSOR_PARAMS = (1 << 3),\n> > +     IPA_RESULT_SENSOR_CTRLS = (1 << 4),\n> > +     IPA_RESULT_DROP_FRAMES = (1 << 5),\n> >  };\n> >\n> >  enum Operations {\n> > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp\n> b/src/ipa/raspberrypi/raspberrypi.cpp\n> > index 681ab9211b7c..fea1ea3957bb 100644\n> > --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> > +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> > @@ -170,7 +170,7 @@ int IPARPi::start(const IPAOperationData &data,\n> IPAOperationData *result)\n> >\n> >       ASSERT(result);\n> >       result->operation = 0;\n> > -     if (data.operation & RPi::IPA_CONFIG_STARTUP) {\n> > +     if (data.operation & RPi::IPA_CONFIG_STARTUP_CTRLS) {\n> >               /* We have been given some controls to action before\n> start. */\n> >               queueRequest(data.controls[0]);\n> >       }\n> > @@ -188,7 +188,7 @@ int IPARPi::start(const IPAOperationData &data,\n> IPAOperationData *result)\n> >               ControlList ctrls(sensorCtrls_);\n> >               applyAGC(&agcStatus, ctrls);\n> >               result->controls.emplace_back(ctrls);\n> > -             result->operation |= RPi::IPA_CONFIG_SENSOR;\n> > +             result->operation |= RPi::IPA_RESULT_SENSOR_CTRLS;\n> >       }\n> >\n> >       /*\n> > @@ -236,7 +236,7 @@ int IPARPi::start(const IPAOperationData &data,\n> IPAOperationData *result)\n> >       }\n> >\n> >       result->data.push_back(dropFrame);\n> > -     result->operation |= RPi::IPA_CONFIG_DROP_FRAMES;\n> > +     result->operation |= RPi::IPA_RESULT_DROP_FRAMES;\n> >\n> >       firstStart_ = false;\n> >\n> > @@ -289,7 +289,7 @@ void IPARPi::configure(const CameraSensorInfo\n> &sensorInfo,\n> >  {\n> >       if (entityControls.size() != 2) {\n> >               LOG(IPARPI, Error) << \"No ISP or sensor controls found.\";\n> > -             result->operation = RPi::IPA_CONFIG_FAILED;\n> > +             result->operation = RPi::IPA_RESULT_CONFIG_FAILED;\n> >               return;\n> >       }\n> >\n> > @@ -300,13 +300,13 @@ void IPARPi::configure(const CameraSensorInfo\n> &sensorInfo,\n> >\n> >       if (!validateSensorControls()) {\n> >               LOG(IPARPI, Error) << \"Sensor control validation failed.\";\n> > -             result->operation = RPi::IPA_CONFIG_FAILED;\n> > +             result->operation = RPi::IPA_RESULT_CONFIG_FAILED;\n> >               return;\n> >       }\n> >\n> >       if (!validateIspControls()) {\n> >               LOG(IPARPI, Error) << \"ISP control validation failed.\";\n> > -             result->operation = RPi::IPA_CONFIG_FAILED;\n> > +             result->operation = RPi::IPA_RESULT_CONFIG_FAILED;\n> >               return;\n> >       }\n> >\n> > @@ -325,7 +325,7 @@ void IPARPi::configure(const CameraSensorInfo\n> &sensorInfo,\n> >               if (!helper_) {\n> >                       LOG(IPARPI, Error) << \"Could not create camera\n> helper for \"\n> >                                          << cameraName;\n> > -                     result->operation = RPi::IPA_CONFIG_FAILED;\n> > +                     result->operation = RPi::IPA_RESULT_CONFIG_FAILED;\n> >                       return;\n> >               }\n> >\n> > @@ -342,7 +342,7 @@ void IPARPi::configure(const CameraSensorInfo\n> &sensorInfo,\n> >               result->data.push_back(exposureDelay); /* For VBLANK ctrl\n> */\n> >               result->data.push_back(sensorMetadata);\n> >\n> > -             result->operation |= RPi::IPA_CONFIG_STAGGERED_WRITE;\n> > +             result->operation |= RPi::IPA_RESULT_SENSOR_PARAMS;\n> >       }\n> >\n> >       /* Re-assemble camera mode using the sensor info. */\n> > @@ -395,7 +395,7 @@ void IPARPi::configure(const CameraSensorInfo\n> &sensorInfo,\n> >               applyAGC(&agcStatus, ctrls);\n> >\n> >               result->controls.emplace_back(ctrls);\n> > -             result->operation |= RPi::IPA_CONFIG_SENSOR;\n> > +             result->operation |= RPi::IPA_RESULT_SENSOR_CTRLS;\n> >       }\n> >\n> >       lastMode_ = mode_;\n> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > index 5ad12d99638f..c44cb437a596 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > @@ -753,7 +753,7 @@ int PipelineHandlerRPi::start(Camera *camera,\n> [[maybe_unused]] ControlList *cont\n> >       IPAOperationData ipaData = {};\n> >       IPAOperationData result = {};\n> >       if (controls) {\n> > -             ipaData.operation = RPi::IPA_CONFIG_STARTUP;\n> > +             ipaData.operation = RPi::IPA_CONFIG_STARTUP_CTRLS;\n> >               ipaData.controls.emplace_back(*controls);\n> >       }\n> >       ret = data->ipa_->start(ipaData, &result);\n> > @@ -765,12 +765,12 @@ int PipelineHandlerRPi::start(Camera *camera,\n> [[maybe_unused]] ControlList *cont\n> >       }\n> >\n> >       /* Apply any gain/exposure settings that the IPA may have passed\n> back. */\n> > -     if (result.operation & RPi::IPA_CONFIG_SENSOR) {\n> > +     if (result.operation & RPi::IPA_RESULT_SENSOR_CTRLS) {\n> >               ControlList &ctrls = result.controls[0];\n> >               data->unicam_[Unicam::Image].dev()->setControls(&ctrls);\n> >       }\n> >\n> > -     if (result.operation & RPi::IPA_CONFIG_DROP_FRAMES) {\n> > +     if (result.operation & RPi::IPA_RESULT_DROP_FRAMES) {\n> >               /* Configure the number of dropped frames required on\n> startup. */\n> >               data->dropFrameCount_ = result.data[0];\n> >       }\n> > @@ -1213,31 +1213,28 @@ int RPiCameraData::configureIPA(const\n> CameraConfiguration *config)\n> >       ipa_->configure(sensorInfo_, streamConfig, entityControls,\n> ipaConfig,\n> >                       &result);\n> >\n> > -     if (result.operation & RPi::IPA_CONFIG_FAILED) {\n> > +     if (result.operation & RPi::IPA_RESULT_CONFIG_FAILED) {\n> >               LOG(RPI, Error) << \"IPA configuration failed!\";\n> >               return -EPIPE;\n> >       }\n> >\n> >       unsigned int resultIdx = 0;\n> > -     if (result.operation & RPi::IPA_CONFIG_STAGGERED_WRITE) {\n> > +     if (result.operation & RPi::IPA_RESULT_SENSOR_PARAMS) {\n> >               /*\n> >                * Setup our delayed control writer with the sensor default\n> >                * gain and exposure delays.\n> >                */\n> > -             if (!delayedCtrls_) {\n> > -                     std::unordered_map<uint32_t, unsigned int> delays\n> = {\n> > -                             { V4L2_CID_ANALOGUE_GAIN,\n> result.data[resultIdx++] },\n> > -                             { V4L2_CID_EXPOSURE,\n> result.data[resultIdx++] },\n> > -                             { V4L2_CID_VBLANK,\n> result.data[resultIdx++] }\n> > -                     };\n> > -\n> > -                     delayedCtrls_ =\n> std::make_unique<DelayedControls>(unicam_[Unicam::Image].dev(), delays);\n> > -\n> > -                     sensorMetadata_ = result.data[resultIdx++];\n> > -             }\n> > +             std::unordered_map<uint32_t, unsigned int> delays = {\n> > +                     { V4L2_CID_ANALOGUE_GAIN, result.data[resultIdx++]\n> },\n> > +                     { V4L2_CID_EXPOSURE, result.data[resultIdx++] },\n> > +                     { V4L2_CID_VBLANK, result.data[resultIdx++] }\n> > +             };\n> > +\n> > +             delayedCtrls_ =\n> std::make_unique<DelayedControls>(unicam_[Unicam::Image].dev(), delays);\n> > +             sensorMetadata_ = result.data[resultIdx++];\n> >       }\n> >\n> > -     if (result.operation & RPi::IPA_CONFIG_SENSOR) {\n> > +     if (result.operation & RPi::IPA_RESULT_SENSOR_CTRLS) {\n> >               ControlList &ctrls = result.controls[0];\n> >               unicam_[Unicam::Image].dev()->setControls(&ctrls);\n> >       }\n> > --\n> > 2.25.1\n> >\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel\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 1D597C33BB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Feb 2021 12:42:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A572E68407;\n\tMon,  1 Feb 2021 13:42:01 +0100 (CET)","from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com\n\t[IPv6:2a00:1450:4864:20::22e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E4CC368374\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Feb 2021 13:41:59 +0100 (CET)","by mail-lj1-x22e.google.com with SMTP id f2so19363526ljp.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 01 Feb 2021 04:41:59 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"ntrerYdO\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=mbVngkQ2Wxx7ic+IVEWeJnMaJnSMQBkeLaTA4ylnpUw=;\n\tb=ntrerYdOBthDwfJuusvX/2ptTCtb3LRWvTIc+ZD6zX/r/PBmUcXDXwyqQskz2peYZe\n\tkFLOo+c5cfhDv4ljYFlrl3FoPG4vkFdycpYcFlSubc/Wz0DEP9xilzSxDzqAnXAO5Tep\n\tr/RFj4sWJakbpygrPFlIIMFsiBK4Z7bZk3Q3kI/aHP8lZq0oEDxHIwNFfppM5HAD1TqF\n\tjHoOfr73aoxNG3TsQCHMXKgn0XyoVvdY/XCdSUwp1Ib/VYM6w+Z6yoP10qkuQE4AFSu5\n\tnb+xG1J55qkJn8qL0l+AqQBcu7I7yx0XAPSOFhsgiEsNMypFOPYdy6I/ItZ59zBRGe8m\n\txBAw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=mbVngkQ2Wxx7ic+IVEWeJnMaJnSMQBkeLaTA4ylnpUw=;\n\tb=XKpxM/P8XTWD+3E136JK85fYM3jeEaFMiuEftLkr/y9iCrt7rGLS0o5xaUmd39hF1z\n\tcbd+XsoxKA0vw/+v9WiTwKhLE4y8NSU8Usj80wd/PcV35Aj/DRj7Pag7XkUZCAvMkhUk\n\tZmpUwQFe8tGPTVuv8jHWHCmEKuGApnV/hWlcXOn9r4lhAEFXqbmI7G7Krr7P3TbuvLBB\n\tuKnho4yFiWP6ewb2g7QyflayHGnaKJsiJ770nY2DwlSV8HFHwhH7xYgn1bwMXzYbup0m\n\t7JDoa2/lnwtrPOaBQ/kYkxk141b4ML+Cr56ho2GmpvlGSEDTj3gnaB2n3oEsFS5zP/vw\n\t/ZsA==","X-Gm-Message-State":"AOAM533yyUSpd+UnmBXjl9ThCw8WpgJVGAFbapR+q47VOO/u+ImNTZBD\n\t8dT9q3W1O/Cy/w8yIbF9TjYkXPq57zmneqPpSM3Ixm/0+rlkqg==","X-Google-Smtp-Source":"ABdhPJxBmdEBuLNfe/OgejysbWfNC3irZXfXIlhdvZL2X0FGL9pxNHdJg4tH7X5YlH3Bb5vi0J1+G94M+7KNw0wDRD8=","X-Received":"by 2002:a05:651c:2108:: with SMTP id\n\ta8mr9874858ljq.329.1612183319191; \n\tMon, 01 Feb 2021 04:41:59 -0800 (PST)","MIME-Version":"1.0","References":"<20210130111651.1073981-1-naush@raspberrypi.com>\n\t<20210201105349.zd2n2f3bmsgbztow@uno.localdomain>","In-Reply-To":"<20210201105349.zd2n2f3bmsgbztow@uno.localdomain>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Mon, 1 Feb 2021 12:41:42 +0000","Message-ID":"<CAEmqJPpncdTVsoAE-g0LQ69t4RJw-d3KODkebseDwz1D0UVDWg@mail.gmail.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH] pipeline: ipa: raspberrypi:\n\tRationalise use of RPi::ConfigParameters","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 <libcamera-devel@lists.libcamera.org>","Content-Type":"multipart/mixed;\n\tboundary=\"===============7212299868667571644==\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]