[{"id":32882,"web_url":"https://patchwork.libcamera.org/comment/32882/","msgid":"<173460273073.2110922.5615712871373007328@ping.linuxembedded.co.uk>","date":"2024-12-19T10:05:30","subject":"Re: [PATCH v2 4/4] ipa: rpi: Provide the camera helper with the\n\thardware configuration","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Naushir Patuck (2024-12-18 08:34:21)\n> Add a CamHelper::setHwConfig() helper used by the IPA to set the\n> hardware configuration in use by the pipeline. This will be needed by\n> the IMX500 camera helper in a future commit to determine if the\n> metadata buffer is strided.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nI'll kick this through CI and merge when complete.\n\n> ---\n>  src/ipa/rpi/cam_helper/cam_helper.cpp | 5 +++++\n>  src/ipa/rpi/cam_helper/cam_helper.h   | 2 ++\n>  src/ipa/rpi/common/ipa_base.cpp       | 1 +\n>  3 files changed, 8 insertions(+)\n> \n> diff --git a/src/ipa/rpi/cam_helper/cam_helper.cpp b/src/ipa/rpi/cam_helper/cam_helper.cpp\n> index 6493e88232a4..1422a02e9953 100644\n> --- a/src/ipa/rpi/cam_helper/cam_helper.cpp\n> +++ b/src/ipa/rpi/cam_helper/cam_helper.cpp\n> @@ -156,6 +156,11 @@ void CamHelper::setCameraMode(const CameraMode &mode)\n>         }\n>  }\n>  \n> +void CamHelper::setHwConfig(const Controller::HardwareConfig &hwConfig)\n> +{\n> +       hwConfig_ = hwConfig;\n> +}\n> +\n>  void CamHelper::getDelays(int &exposureDelay, int &gainDelay,\n>                           int &vblankDelay, int &hblankDelay) const\n>  {\n> diff --git a/src/ipa/rpi/cam_helper/cam_helper.h b/src/ipa/rpi/cam_helper/cam_helper.h\n> index 4a4ab5e68cba..fb7eb3202e79 100644\n> --- a/src/ipa/rpi/cam_helper/cam_helper.h\n> +++ b/src/ipa/rpi/cam_helper/cam_helper.h\n> @@ -76,6 +76,7 @@ public:\n>         CamHelper(std::unique_ptr<MdParser> parser, unsigned int frameIntegrationDiff);\n>         virtual ~CamHelper();\n>         void setCameraMode(const CameraMode &mode);\n> +       void setHwConfig(const Controller::HardwareConfig &hwConfig);\n>         virtual void prepare(libcamera::Span<const uint8_t> buffer,\n>                              Metadata &metadata);\n>         virtual void process(StatisticsPtr &stats, Metadata &metadata);\n> @@ -108,6 +109,7 @@ protected:\n>  \n>         std::unique_ptr<MdParser> parser_;\n>         CameraMode mode_;\n> +       Controller::HardwareConfig hwConfig_;\n>  \n>  private:\n>         /*\n> diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\n> index 5fce17e67bd6..165c23c88d49 100644\n> --- a/src/ipa/rpi/common/ipa_base.cpp\n> +++ b/src/ipa/rpi/common/ipa_base.cpp\n> @@ -160,6 +160,7 @@ int32_t IpaBase::init(const IPASettings &settings, const InitParams &params, Ini\n>         lensPresent_ = params.lensPresent;\n>  \n>         controller_.initialise();\n> +       helper_->setHwConfig(controller_.getHardwareConfig());\n>  \n>         /* Return the controls handled by the IPA */\n>         ControlInfoMap::Map ctrlMap = ipaControls;\n> -- \n> 2.43.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 6D775C3273\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Dec 2024 10:05:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5ABBE68462;\n\tThu, 19 Dec 2024 11:05:35 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 77D0D67FA7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Dec 2024 11:05:33 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E4C8C163;\n\tThu, 19 Dec 2024 11:04:54 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"dm1VT4RR\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1734602695;\n\tbh=Zm1ybnT/1VH9bZO9P2YGnZyyAvbdBMuGgLyylzy1Bgk=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=dm1VT4RRqP/By1TUdR8oH5Va1pR934QszLAaEgVddgpDu12P6J5F4GPc+Eo7RyZkE\n\toOVyORmLdYSdki+t4uNedwZAVE20Cvwq71A95kCoDGt9ISFDTFRuhyo4KW0A1Z0Wen\n\t7s2TDy1IPeMhgknRkN4bAv92Tt42FIxCIxtgQB6g=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20241218083610.2397879-5-naush@raspberrypi.com>","References":"<20241218083610.2397879-1-naush@raspberrypi.com>\n\t<20241218083610.2397879-5-naush@raspberrypi.com>","Subject":"Re: [PATCH v2 4/4] ipa: rpi: Provide the camera helper with the\n\thardware configuration","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Naushir Patuck <naush@raspberrypi.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 19 Dec 2024 10:05:30 +0000","Message-ID":"<173460273073.2110922.5615712871373007328@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>"}}]