[{"id":27215,"web_url":"https://patchwork.libcamera.org/comment/27215/","msgid":"<20230602063326.GR22609@pendragon.ideasonboard.com>","date":"2023-06-02T06:33:26","subject":"Re: [libcamera-devel] [PATCH v1 2/3] pipeline: ipa: rpi: Return\n\tlens controls from ipa->configure()","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nThank you for the patch.\n\nOn Thu, Jun 01, 2023 at 10:56:29AM +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\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\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>  }","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 0200DC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  2 Jun 2023 06:33:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5009F61EA5;\n\tFri,  2 Jun 2023 08:33:29 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CCADB61EA5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  2 Jun 2023 08:33:27 +0200 (CEST)","from pendragon.ideasonboard.com (om126156168104.26.openmobile.ne.jp\n\t[126.156.168.104])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 52243B2A;\n\tFri,  2 Jun 2023 08:33:04 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1685687609;\n\tbh=5K5Kn2w5XSYSKQx35sM35b88Yq16soVlqcqdg3ptLZA=;\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=p5P8Mp4uS1YlyZ/li5/6mSsYi2KDwQOmie4PB0/m5zIJgN4lbKr8gfpv9Ki8CVkKJ\n\tblFyp172nO8+VzGpmxajSUvhTVpp9nCPHZj27VHV5CqP1FMiQp4Z6GgcUW320n1/wt\n\tQKsIvCz1VphOLePeMrOlWYYHx8gCjXiSob7PLi3C/Cku027s9XQBn+Q8ZycG0d847f\n\tDCc7EqdZ98moQIHS8VVd71+q0qYO2bMG8LasX//LvFIH1VYIoPBfaHk8NY/jfWPaZO\n\twxASmvlFd2lzk9rePRzMTx7s9g1dabNOUmBZ0SrtSiEr56EcEZBr/VB5+uBPOzR1mu\n\taX9rFMxhqu3dg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1685687585;\n\tbh=5K5Kn2w5XSYSKQx35sM35b88Yq16soVlqcqdg3ptLZA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ekyQO2FGE+ez2Ifk7uR2CEiTl+MSqsBN6C9UTsJLRUvNk6gvXMIIJvHkn3ntPxr8V\n\tUfBNCbcU/PrLAC2BUZPDHOFraOHvITlSCO9CNofZUHrY12ksLg737EH2cftsR5hczR\n\tG8MIxlbS7uFibSV94udV4zSr262dgQGk/TmqQNjg="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"ekyQO2FG\"; dkim-atps=neutral","Date":"Fri, 2 Jun 2023 09:33:26 +0300","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20230602063326.GR22609@pendragon.ideasonboard.com>","References":"<20230601095630.25443-1-naush@raspberrypi.com>\n\t<20230601095630.25443-3-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230601095630.25443-3-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v1 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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"nick.hollinghurst@raspberrypi.com, libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]