[{"id":27277,"web_url":"https://patchwork.libcamera.org/comment/27277/","msgid":"<usokcpsq4s2i3o2q5wzmze7fytz6nfxs7xf5oe7gc7orakamiq@2bunqhazlzc4>","date":"2023-06-06T13:38:13","subject":"Re: [libcamera-devel] [PATCH v3 2/3] pipeline: ipa: rpi: Return\n\tlens controls from ipa->configure()","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Naush\n\nOn Mon, Jun 05, 2023 at 10:14:05AM +0100, Naushir Patuck via libcamera-devel wrote:\n> In addition to sensor controls, return lens controls from\n> IpaBase::configure() back to the pipeline handler. If there are lens\n> controls present in the ControlList, action them in the pipeline handler\n> as part of the configure routine.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n2/3 and 3/3 could be squashed\nfor both\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThanks\n   j\n\n> ---\n>  include/libcamera/ipa/raspberrypi.mojom             | 3 ++-\n>  src/ipa/rpi/common/ipa_base.cpp                     | 2 +-\n>  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 6 ++++--\n>  3 files changed, 7 insertions(+), 4 deletions(-)\n>\n> diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\n> index ba786e647ca1..4f20792e4679 100644\n> --- a/include/libcamera/ipa/raspberrypi.mojom\n> +++ b/include/libcamera/ipa/raspberrypi.mojom\n> @@ -46,7 +46,8 @@ struct ConfigParams {\n>  struct ConfigResult {\n>  \tfloat modeSensitivity;\n>  \tlibcamera.ControlInfoMap controlInfo;\n> -\tlibcamera.ControlList controls;\n> +\tlibcamera.ControlList sensorControls;\n> +\tlibcamera.ControlList lensControls;\n>  };\n>\n>  struct StartResult {\n> diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\n> index db7a0eb3a1ca..599ad146a863 100644\n> --- a/src/ipa/rpi/common/ipa_base.cpp\n> +++ b/src/ipa/rpi/common/ipa_base.cpp\n> @@ -201,7 +201,7 @@ int32_t IpaBase::configure(const IPACameraSensorInfo &sensorInfo, const ConfigPa\n>  \t\tapplyAGC(&agcStatus, ctrls);\n>  \t}\n>\n> -\tresult->controls = std::move(ctrls);\n> +\tresult->sensorControls = std::move(ctrls);\n>\n>  \t/*\n>  \t * Apply the correct limits to the exposure, gain and frame duration controls\n> diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> index 3bb5ec531e4f..2ab0b971149a 100644\n> --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> @@ -1192,8 +1192,10 @@ int CameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::Config\n>  \t\treturn -EPIPE;\n>  \t}\n>\n> -\tif (!result->controls.empty())\n> -\t\tsetSensorControls(result->controls);\n> +\tif (!result->sensorControls.empty())\n> +\t\tsetSensorControls(result->sensorControls);\n> +\tif (!result->lensControls.empty())\n> +\t\tsetLensControls(result->lensControls);\n>\n>  \treturn 0;\n>  }\n> --\n> 2.34.1\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 77B4BC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  6 Jun 2023 13:38:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E5DAC62722;\n\tTue,  6 Jun 2023 15:38:19 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2BB7362709\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Jun 2023 15:38:18 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2001:b07:5d2e:52c9:72c3:346:a663:c82d])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3A491105;\n\tTue,  6 Jun 2023 15:37:51 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1686058699;\n\tbh=WxWWQx1tq1Y9AeqpAelE6vBTlkKLxuwSHliYl0+6MVs=;\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=ncVGsAo07e7LyQCHxJxiNx0yY5oOoCwDDjTFMVZjPRSeJNXfd4xS0W3PMKMfkhySx\n\tOrkYEx52/lXbRLvVKFLnRXQqrBZQLvgbUa6vizYlLVQeeXtemvE6F5pXE1H9Vgpa/m\n\tRtNRexTbwkAWZj9nvOSjiQU8KQdOXhXiCNvNLoZ/xkjQ2GOTa44pNJlN3nIhul6jrD\n\tvbOZbxEzlNwUY7wSsJsATXEchZxQAFExMNeysq8x/EjsBnvHh0Vf8NXBoXrT5If6f4\n\tU56dZk9HiyCVkNZJZsLrs924lrNtJnnKgSQ1w1v7UCeqVR8F5JLTXy2kB3cYE0GG6y\n\tqapjuSUlLzwvw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1686058671;\n\tbh=WxWWQx1tq1Y9AeqpAelE6vBTlkKLxuwSHliYl0+6MVs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=MNOgrBGL+wIZZvCX/8FmX3rhsf5V4jM3BLH01f/PSIyHJN9/b/CT4PR035FgaCumz\n\t8f4rezQ6oayJTz6o0mPoe4rkm/3WoODjLeC6EIwMK91w4L3iX4M2fnLOWDWVEvPnSE\n\tDTa3POrVJH2zTBusEUWeKyKrQlCaE28nZqf7btgM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"MNOgrBGL\"; dkim-atps=neutral","Date":"Tue, 6 Jun 2023 15:38:13 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<usokcpsq4s2i3o2q5wzmze7fytz6nfxs7xf5oe7gc7orakamiq@2bunqhazlzc4>","References":"<20230605091406.31757-1-naush@raspberrypi.com>\n\t<20230605091406.31757-3-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230605091406.31757-3-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v3 2/3] pipeline: ipa: rpi: Return\n\tlens controls from ipa->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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@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>"}}]