[{"id":20252,"web_url":"https://patchwork.libcamera.org/comment/20252/","msgid":"<YWoI8vLbxp9oBoZC@pendragon.ideasonboard.com>","date":"2021-10-15T23:04:18","subject":"Re: [libcamera-devel] [IPU3-IPA PATCH] ipu3: Update camera controls\n\tin configure()","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Fri, Oct 15, 2021 at 04:10:04PM +0100, Kieran Bingham wrote:\n> When a new CameraConfiguration is applied to the Camera the IPA is\n> configured as well, using the newly applied sensor configuration and its\n> updated V4L2 controls.\n> \n> Also update the Camera controls at IPA::configure() time by re-computing\n> the controls::ExposureTime and controls::FrameDurationLimits limits and\n> update the controls on the pipeline handler side after having configured\n> the IPA.\n> \n> This commit corresponds to the libcamera commit 4ed22985a846 (\"ipa:\n> ipu3: Update camera controls in configure()\") and applies the same\n> changes to this IPA.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  ipu3.cpp | 127 ++++++++++++++++++++++++++++++++++---------------------\n>  1 file changed, 78 insertions(+), 49 deletions(-)\n> \n> diff --git a/ipu3.cpp b/ipu3.cpp\n> index 7589eecbb64c..8126e9d659df 100644\n> --- a/ipu3.cpp\n> +++ b/ipu3.cpp\n> @@ -44,13 +44,17 @@ public:\n>  \tint start() override;\n>  \tvoid stop() override {}\n>  \n> -\tint configure(const IPAConfigInfo &configInfo) override;\n> +\tint configure(const IPAConfigInfo &configInfo,\n> +\t\t      ControlInfoMap *ipaControls) override;\n>  \n>  \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n>  \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n>  \tvoid processEvent(const IPU3Event &event) override;\n>  \n>  private:\n> +\tvoid updateControls(const IPACameraSensorInfo &sensorInfo,\n> +\t\t\t    const ControlInfoMap &sensorControls,\n> +\t\t\t    ControlInfoMap *ipaControls);\n>  \tvoid processControls(unsigned int frame, const ControlList &metadata);\n>  \tvoid fillParams(unsigned int frame, ipu3_uapi_params *params);\n>  \tvoid parseStatistics(unsigned int frame,\n> @@ -86,6 +90,68 @@ private:\n>  \tBinaryData aiqd_;\n>  };\n>  \n> +/*\n> + * Compute camera controls using the sensor information and the sensor\n> + * v4l2 controls.\n> + *\n> + * Some of the camera controls are computed by the pipeline handler, some others\n> + * by the IPA module which is in charge of handling, for example, the exposure\n> + * time and the frame duration.\n> + *\n> + * This function computes:\n> + * - controls::ExposureTime\n> + * - controls::FrameDurationLimits\n> + */\n> +void IPAIPU3::updateControls(const IPACameraSensorInfo &sensorInfo,\n> +\t\t\t     const ControlInfoMap &sensorControls,\n> +\t\t\t     ControlInfoMap *ipaControls)\n> +{\n> +\tControlInfoMap::Map controls{};\n> +\n> +\t/*\n> +\t * Compute exposure time limits by using line length and pixel rate\n> +\t * converted to microseconds. Use the V4L2_CID_EXPOSURE control to get\n> +\t * exposure min, max and default and convert it from lines to\n> +\t * microseconds.\n> +\t */\n> +\tdouble lineDuration = sensorInfo.lineLength / (sensorInfo.pixelRate / 1e6);\n> +\tconst ControlInfo &v4l2Exposure = sensorControls.find(V4L2_CID_EXPOSURE)->second;\n> +\tint32_t minExposure = v4l2Exposure.min().get<int32_t>() * lineDuration;\n> +\tint32_t maxExposure = v4l2Exposure.max().get<int32_t>() * lineDuration;\n> +\tint32_t defExposure = v4l2Exposure.def().get<int32_t>() * lineDuration;\n> +\tcontrols[&controls::ExposureTime] = ControlInfo(minExposure, maxExposure,\n> +\t\t\t\t\t\t\tdefExposure);\n> +\n> +\t/*\n> +\t * Compute the frame duration limits.\n> +\t *\n> +\t * The frame length is computed assuming a fixed line length combined\n> +\t * with the vertical frame sizes.\n> +\t */\n> +\tconst ControlInfo &v4l2HBlank = sensorControls.find(V4L2_CID_HBLANK)->second;\n> +\tuint32_t hblank = v4l2HBlank.def().get<int32_t>();\n> +\tuint32_t lineLength = sensorInfo.outputSize.width + hblank;\n> +\n> +\tconst ControlInfo &v4l2VBlank = sensorControls.find(V4L2_CID_VBLANK)->second;\n> +\tstd::array<uint32_t, 3> frameHeights{\n> +\t\tv4l2VBlank.min().get<int32_t>() + sensorInfo.outputSize.height,\n> +\t\tv4l2VBlank.max().get<int32_t>() + sensorInfo.outputSize.height,\n> +\t\tv4l2VBlank.def().get<int32_t>() + sensorInfo.outputSize.height,\n> +\t};\n> +\n> +\tstd::array<int64_t, 3> frameDurations;\n> +\tfor (unsigned int i = 0; i < frameHeights.size(); ++i) {\n> +\t\tuint64_t frameSize = lineLength * frameHeights[i];\n> +\t\tframeDurations[i] = frameSize / (sensorInfo.pixelRate / 1000000U);\n> +\t}\n> +\n> +\tcontrols[&controls::FrameDurationLimits] = ControlInfo(frameDurations[0],\n> +\t\t\t\t\t\t\t       frameDurations[1],\n> +\t\t\t\t\t\t\t       frameDurations[2]);\n> +\n> +\t*ipaControls = ControlInfoMap(std::move(controls), controls::controls);\n> +}\n> +\n>  int IPAIPU3::init(const IPASettings &settings,\n>  \t\t  const IPACameraSensorInfo &sensorInfo,\n>  \t\t  const ControlInfoMap &sensorControls,\n> @@ -141,53 +207,8 @@ int IPAIPU3::init(const IPASettings &settings,\n>  \n>  \taiqInputParams_.init();\n>  \n> -\t/* Initialize Controls. */\n> -\tControlInfoMap::Map controls{};\n> -\n> -\t/*\n> -\t * Compute exposure time limits.\n> -\t *\n> -\t * Initialize the control using the line length and pixel rate of the\n> -\t * current configuration converted to microseconds. Use the\n> -\t * V4L2_CID_EXPOSURE control to get exposure min, max and default and\n> -\t * convert it from lines to microseconds.\n> -\t */\n> -\tdouble lineDuration = sensorInfo.lineLength / (sensorInfo.pixelRate / 1e6);\n> -\tconst ControlInfo &v4l2Exposure = sensorControls.find(V4L2_CID_EXPOSURE)->second;\n> -\tint32_t minExposure = v4l2Exposure.min().get<int32_t>() * lineDuration;\n> -\tint32_t maxExposure = v4l2Exposure.max().get<int32_t>() * lineDuration;\n> -\tint32_t defExposure = v4l2Exposure.def().get<int32_t>() * lineDuration;\n> -\tcontrols[&controls::ExposureTime] = ControlInfo(minExposure, maxExposure,\n> -\t\t\t\t\t\t\tdefExposure);\n> -\n> -\t/*\n> -\t * Compute the frame duration limits.\n> -\t *\n> -\t * The frame length is computed assuming a fixed line length combined\n> -\t * with the vertical frame sizes.\n> -\t */\n> -\tconst ControlInfo &v4l2HBlank = sensorControls.find(V4L2_CID_HBLANK)->second;\n> -\tuint32_t hblank = v4l2HBlank.def().get<int32_t>();\n> -\tuint32_t lineLength = sensorInfo.outputSize.width + hblank;\n> -\n> -\tconst ControlInfo &v4l2VBlank = sensorControls.find(V4L2_CID_VBLANK)->second;\n> -\tstd::array<uint32_t, 3> frameHeights{\n> -\t\tv4l2VBlank.min().get<int32_t>() + sensorInfo.outputSize.height,\n> -\t\tv4l2VBlank.max().get<int32_t>() + sensorInfo.outputSize.height,\n> -\t\tv4l2VBlank.def().get<int32_t>() + sensorInfo.outputSize.height,\n> -\t};\n> -\n> -\tstd::array<int64_t, 3> frameDurations;\n> -\tfor (unsigned int i = 0; i < frameHeights.size(); ++i) {\n> -\t\tuint64_t frameSize = lineLength * frameHeights[i];\n> -\t\tframeDurations[i] = frameSize / (sensorInfo.pixelRate / 1000000U);\n> -\t}\n> -\n> -\tcontrols[&controls::FrameDurationLimits] = ControlInfo(frameDurations[0],\n> -\t\t\t\t\t\t\t       frameDurations[1],\n> -\t\t\t\t\t\t\t       frameDurations[2]);\n> -\n> -\t*ipaControls = ControlInfoMap(std::move(controls), controls::controls);\n> +\t/* Initialize controls. */\n> +\tupdateControls(sensorInfo, sensorControls, ipaControls);\n>  \n>  \treturn 0;\n>  }\n> @@ -199,7 +220,8 @@ int IPAIPU3::start()\n>  \treturn 0;\n>  }\n>  \n> -int IPAIPU3::configure(const IPAConfigInfo &configInfo)\n> +int IPAIPU3::configure(const IPAConfigInfo &configInfo,\n> +\t\t       ControlInfoMap *ipaControls)\n>  {\n>  \tif (configInfo.sensorControls.empty()) {\n>  \t\tLOG(IPAIPU3, Error) << \"No sensor controls provided\";\n> @@ -208,6 +230,10 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>  \n>  \tsensorInfo_ = configInfo.sensorInfo;\n>  \n> +\t/*\n> +\t * Compute the sensor V4L2 controls to be used by the algorithms and\n> +\t * to be set on the sensor.\n> +\t */\n>  \tctrls_ = configInfo.sensorControls;\n>  \n>  \tconst auto itExp = ctrls_.find(V4L2_CID_EXPOSURE);\n> @@ -253,6 +279,9 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>  \t/* Set AE/AWB defaults, this typically might not belong here */\n>  \taiqInputParams_.setAeAwbAfDefaults();\n>  \n> +\t/* Upate the camera controls using the new sensor settings. */\n> +\tupdateControls(sensorInfo_, ctrls_, ipaControls);\n> +\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 88AE6C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Oct 2021 23:04:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 09ADE68F4F;\n\tSat, 16 Oct 2021 01:04:37 +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 3CC6768541\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 16 Oct 2021 01:04:35 +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 9C8F929B;\n\tSat, 16 Oct 2021 01:04:34 +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=\"eNVcGpGt\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634339074;\n\tbh=glvsSs90xRbsYSeJgv9LAve6GdQFv+KZo0wWECrSp7c=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=eNVcGpGt6prfwLDyxilQc1NtgzYyBwRmm35lqT5ziUXrSF0GUaP0TU9oDuFLJgiuD\n\t+gnk+QSWN9bl/l9e+f9VHUdtqUcA7HdKwR5e8tgdqltM+z9l6BJcSdqVcH5XAyBp4Q\n\tMgvz5992Apz2vghH/5kKE0PXV0wJeKCmRbtzj7WY=","Date":"Sat, 16 Oct 2021 02:04:18 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YWoI8vLbxp9oBoZC@pendragon.ideasonboard.com>","References":"<20211015151004.291295-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20211015151004.291295-1-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [IPU3-IPA PATCH] ipu3: Update camera controls\n\tin configure()","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20265,"web_url":"https://patchwork.libcamera.org/comment/20265/","msgid":"<67d54bd1-4872-f52c-3380-b5b040ca27fc@ideasonboard.com>","date":"2021-10-18T13:36:25","subject":"Re: [libcamera-devel] [IPU3-IPA PATCH] ipu3: Update camera controls\n\tin configure()","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hello,\n\nThanks for the patch.\n\nOn 10/15/21 8:40 PM, Kieran Bingham wrote:\n> When a new CameraConfiguration is applied to the Camera the IPA is\n> configured as well, using the newly applied sensor configuration and its\n> updated V4L2 controls.\n>\n> Also update the Camera controls at IPA::configure() time by re-computing\n> the controls::ExposureTime and controls::FrameDurationLimits limits and\n> update the controls on the pipeline handler side after having configured\n> the IPA.\n>\n> This commit corresponds to the libcamera commit 4ed22985a846 (\"ipa:\n> ipu3: Update camera controls in configure()\") and applies the same\n> changes to this IPA.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\nReviewed-by: Umang Jain<umang.jain@ideasonboard.com>\n\n> ---\n>   ipu3.cpp | 127 ++++++++++++++++++++++++++++++++++---------------------\n>   1 file changed, 78 insertions(+), 49 deletions(-)\n>\n> diff --git a/ipu3.cpp b/ipu3.cpp\n> index 7589eecbb64c..8126e9d659df 100644\n> --- a/ipu3.cpp\n> +++ b/ipu3.cpp\n> @@ -44,13 +44,17 @@ public:\n>   \tint start() override;\n>   \tvoid stop() override {}\n>   \n> -\tint configure(const IPAConfigInfo &configInfo) override;\n> +\tint configure(const IPAConfigInfo &configInfo,\n> +\t\t      ControlInfoMap *ipaControls) override;\n>   \n>   \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n>   \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n>   \tvoid processEvent(const IPU3Event &event) override;\n>   \n>   private:\n> +\tvoid updateControls(const IPACameraSensorInfo &sensorInfo,\n> +\t\t\t    const ControlInfoMap &sensorControls,\n> +\t\t\t    ControlInfoMap *ipaControls);\n>   \tvoid processControls(unsigned int frame, const ControlList &metadata);\n>   \tvoid fillParams(unsigned int frame, ipu3_uapi_params *params);\n>   \tvoid parseStatistics(unsigned int frame,\n> @@ -86,6 +90,68 @@ private:\n>   \tBinaryData aiqd_;\n>   };\n>   \n> +/*\n> + * Compute camera controls using the sensor information and the sensor\n> + * v4l2 controls.\n> + *\n> + * Some of the camera controls are computed by the pipeline handler, some others\n> + * by the IPA module which is in charge of handling, for example, the exposure\n> + * time and the frame duration.\n> + *\n> + * This function computes:\n> + * - controls::ExposureTime\n> + * - controls::FrameDurationLimits\n> + */\n> +void IPAIPU3::updateControls(const IPACameraSensorInfo &sensorInfo,\n> +\t\t\t     const ControlInfoMap &sensorControls,\n> +\t\t\t     ControlInfoMap *ipaControls)\n> +{\n> +\tControlInfoMap::Map controls{};\n> +\n> +\t/*\n> +\t * Compute exposure time limits by using line length and pixel rate\n> +\t * converted to microseconds. Use the V4L2_CID_EXPOSURE control to get\n> +\t * exposure min, max and default and convert it from lines to\n> +\t * microseconds.\n> +\t */\n> +\tdouble lineDuration = sensorInfo.lineLength / (sensorInfo.pixelRate / 1e6);\n> +\tconst ControlInfo &v4l2Exposure = sensorControls.find(V4L2_CID_EXPOSURE)->second;\n> +\tint32_t minExposure = v4l2Exposure.min().get<int32_t>() * lineDuration;\n> +\tint32_t maxExposure = v4l2Exposure.max().get<int32_t>() * lineDuration;\n> +\tint32_t defExposure = v4l2Exposure.def().get<int32_t>() * lineDuration;\n> +\tcontrols[&controls::ExposureTime] = ControlInfo(minExposure, maxExposure,\n> +\t\t\t\t\t\t\tdefExposure);\n> +\n> +\t/*\n> +\t * Compute the frame duration limits.\n> +\t *\n> +\t * The frame length is computed assuming a fixed line length combined\n> +\t * with the vertical frame sizes.\n> +\t */\n> +\tconst ControlInfo &v4l2HBlank = sensorControls.find(V4L2_CID_HBLANK)->second;\n> +\tuint32_t hblank = v4l2HBlank.def().get<int32_t>();\n> +\tuint32_t lineLength = sensorInfo.outputSize.width + hblank;\n> +\n> +\tconst ControlInfo &v4l2VBlank = sensorControls.find(V4L2_CID_VBLANK)->second;\n> +\tstd::array<uint32_t, 3> frameHeights{\n> +\t\tv4l2VBlank.min().get<int32_t>() + sensorInfo.outputSize.height,\n> +\t\tv4l2VBlank.max().get<int32_t>() + sensorInfo.outputSize.height,\n> +\t\tv4l2VBlank.def().get<int32_t>() + sensorInfo.outputSize.height,\n> +\t};\n> +\n> +\tstd::array<int64_t, 3> frameDurations;\n> +\tfor (unsigned int i = 0; i < frameHeights.size(); ++i) {\n> +\t\tuint64_t frameSize = lineLength * frameHeights[i];\n> +\t\tframeDurations[i] = frameSize / (sensorInfo.pixelRate / 1000000U);\n> +\t}\n> +\n> +\tcontrols[&controls::FrameDurationLimits] = ControlInfo(frameDurations[0],\n> +\t\t\t\t\t\t\t       frameDurations[1],\n> +\t\t\t\t\t\t\t       frameDurations[2]);\n> +\n> +\t*ipaControls = ControlInfoMap(std::move(controls), controls::controls);\n> +}\n> +\n>   int IPAIPU3::init(const IPASettings &settings,\n>   \t\t  const IPACameraSensorInfo &sensorInfo,\n>   \t\t  const ControlInfoMap &sensorControls,\n> @@ -141,53 +207,8 @@ int IPAIPU3::init(const IPASettings &settings,\n>   \n>   \taiqInputParams_.init();\n>   \n> -\t/* Initialize Controls. */\n> -\tControlInfoMap::Map controls{};\n> -\n> -\t/*\n> -\t * Compute exposure time limits.\n> -\t *\n> -\t * Initialize the control using the line length and pixel rate of the\n> -\t * current configuration converted to microseconds. Use the\n> -\t * V4L2_CID_EXPOSURE control to get exposure min, max and default and\n> -\t * convert it from lines to microseconds.\n> -\t */\n> -\tdouble lineDuration = sensorInfo.lineLength / (sensorInfo.pixelRate / 1e6);\n> -\tconst ControlInfo &v4l2Exposure = sensorControls.find(V4L2_CID_EXPOSURE)->second;\n> -\tint32_t minExposure = v4l2Exposure.min().get<int32_t>() * lineDuration;\n> -\tint32_t maxExposure = v4l2Exposure.max().get<int32_t>() * lineDuration;\n> -\tint32_t defExposure = v4l2Exposure.def().get<int32_t>() * lineDuration;\n> -\tcontrols[&controls::ExposureTime] = ControlInfo(minExposure, maxExposure,\n> -\t\t\t\t\t\t\tdefExposure);\n> -\n> -\t/*\n> -\t * Compute the frame duration limits.\n> -\t *\n> -\t * The frame length is computed assuming a fixed line length combined\n> -\t * with the vertical frame sizes.\n> -\t */\n> -\tconst ControlInfo &v4l2HBlank = sensorControls.find(V4L2_CID_HBLANK)->second;\n> -\tuint32_t hblank = v4l2HBlank.def().get<int32_t>();\n> -\tuint32_t lineLength = sensorInfo.outputSize.width + hblank;\n> -\n> -\tconst ControlInfo &v4l2VBlank = sensorControls.find(V4L2_CID_VBLANK)->second;\n> -\tstd::array<uint32_t, 3> frameHeights{\n> -\t\tv4l2VBlank.min().get<int32_t>() + sensorInfo.outputSize.height,\n> -\t\tv4l2VBlank.max().get<int32_t>() + sensorInfo.outputSize.height,\n> -\t\tv4l2VBlank.def().get<int32_t>() + sensorInfo.outputSize.height,\n> -\t};\n> -\n> -\tstd::array<int64_t, 3> frameDurations;\n> -\tfor (unsigned int i = 0; i < frameHeights.size(); ++i) {\n> -\t\tuint64_t frameSize = lineLength * frameHeights[i];\n> -\t\tframeDurations[i] = frameSize / (sensorInfo.pixelRate / 1000000U);\n> -\t}\n> -\n> -\tcontrols[&controls::FrameDurationLimits] = ControlInfo(frameDurations[0],\n> -\t\t\t\t\t\t\t       frameDurations[1],\n> -\t\t\t\t\t\t\t       frameDurations[2]);\n> -\n> -\t*ipaControls = ControlInfoMap(std::move(controls), controls::controls);\n> +\t/* Initialize controls. */\n> +\tupdateControls(sensorInfo, sensorControls, ipaControls);\n>   \n>   \treturn 0;\n>   }\n> @@ -199,7 +220,8 @@ int IPAIPU3::start()\n>   \treturn 0;\n>   }\n>   \n> -int IPAIPU3::configure(const IPAConfigInfo &configInfo)\n> +int IPAIPU3::configure(const IPAConfigInfo &configInfo,\n> +\t\t       ControlInfoMap *ipaControls)\n>   {\n>   \tif (configInfo.sensorControls.empty()) {\n>   \t\tLOG(IPAIPU3, Error) << \"No sensor controls provided\";\n> @@ -208,6 +230,10 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>   \n>   \tsensorInfo_ = configInfo.sensorInfo;\n>   \n> +\t/*\n> +\t * Compute the sensor V4L2 controls to be used by the algorithms and\n> +\t * to be set on the sensor.\n> +\t */\n>   \tctrls_ = configInfo.sensorControls;\n>   \n>   \tconst auto itExp = ctrls_.find(V4L2_CID_EXPOSURE);\n> @@ -253,6 +279,9 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>   \t/* Set AE/AWB defaults, this typically might not belong here */\n>   \taiqInputParams_.setAeAwbAfDefaults();\n>   \n> +\t/* Upate the camera controls using the new sensor settings. */\n> +\tupdateControls(sensorInfo_, ctrls_, ipaControls);\n> +\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 B410CC324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Oct 2021 13:36:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 834CA68F58;\n\tMon, 18 Oct 2021 15:36:32 +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 B8F2568F56\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Oct 2021 15:36:30 +0200 (CEST)","from [192.168.1.106] (unknown [103.238.109.14])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0A0E48C6;\n\tMon, 18 Oct 2021 15:36:29 +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=\"QdC4Bn5b\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634564190;\n\tbh=WqqqPsYOnjgtehBfuzz4jmTvWi0FR5gB0bT1bMW2I84=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=QdC4Bn5bYWDDGxBfnOaYSdSM0GhfntHoxnAgO83zOgoaTFvE4wm6xB/Xm/qFxNf0f\n\tRGNhZITt6iOglnAZE1u1VzbR7dHohooBNm2b/0xk+dnUUtjNgn1TCpY8gQgdR7fIZ4\n\tkaxIKygYdWtdwLaReOLyQivy4/vqhLeAd6O4MvzQ=","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","References":"<20211015151004.291295-1-kieran.bingham@ideasonboard.com>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<67d54bd1-4872-f52c-3380-b5b040ca27fc@ideasonboard.com>","Date":"Mon, 18 Oct 2021 19:06:25 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.10.2","MIME-Version":"1.0","In-Reply-To":"<20211015151004.291295-1-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"7bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [IPU3-IPA PATCH] ipu3: Update camera controls\n\tin configure()","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>"}}]