From patchwork Wed Dec 18 08:34:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 22395 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 33A0AC3301 for ; Wed, 18 Dec 2024 08:36:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C8C6B6809B; Wed, 18 Dec 2024 09:36:27 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="SV2/Zh6V"; dkim-atps=neutral Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E5BBD68095 for ; Wed, 18 Dec 2024 09:36:19 +0100 (CET) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-38625aa01b3so592522f8f.3 for ; Wed, 18 Dec 2024 00:36:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1734510979; x=1735115779; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PIP26LxRuK+JHZPjKFeLlcD5pLgXl3eiU614VFDvcKc=; b=SV2/Zh6V+qWsOx8Rh2weiC9AMi8c6ATVGo49trKJmfxZNSpqXr5OmlZwpTFqlsPZm/ Eoe8I3/TBIg3b6Zi1GY7Z+cjbmIwAIfNK89A8OlHy7jobpnIRhnd+zfw4r1AZeR7gXZz UGXpcX69jIllW8dIeh+UA6sEH8AQ1B6yBtlABWNGEknjo4yW1TBOASJWUhs5p6aNbX+l JXSXzGO6KYcWxp8HjxZoli82wec6JfrbjHuIuxtW849dQMM8Cpitv1W4NPk/en9g5Moh IGyWw61ASdrk8reyhbQJj3e6MKUzE4d5Ta5GuFPfEyNPoGZKX9ugF3UFpECgKdCZaUxP BFXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734510979; x=1735115779; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PIP26LxRuK+JHZPjKFeLlcD5pLgXl3eiU614VFDvcKc=; b=SHYMSapAiPBQ4hdYiVqrvUvZXPy24BzHPQfZM4h29fzMaBN7vD9di1hybJZfa2QcLK AL+ilbUVO0nzz3mKBKvyNMkw3Dvy5WpIovN6X9vviaZDGaccPNHNqSxlx5lO63RrIS2j NSm5z1wveDyGolGKTDr64MiIJFONpHWdCOu59S4qC9dz7jfsMVCSdZJYk57fRnBq+lcm ZDJXi8NLI2belHgmPePDs9yi+CQ2rOij94KeEjwlJ7gB8UaC1vryvVjIE8qALY885OcR AY2iD19mnAgrRI4b0i5UrtGYWAgl4z9M3m8dSY8TAXWTZYsP1nco6OZLGYPlV4Z+5XO7 M5AQ== X-Gm-Message-State: AOJu0YxTFYbnUOD0EWNyblI7/JJNIBSug7THVUyPyET6tImU+Ya2tXFp jpfQcmbb13bxmf5Yu82bl4tF3YVjZdou5OuAXnboTpzbKdU4NixRW1QJqfalSANcp0xubeavVgP y X-Gm-Gg: ASbGncsosfMURjklCUUECSubJxZ1oN4DOwQLo3lVYdR0Gx+8o/FDaX7plU7JiR1Z/Og 8Y/ddE47v1nYx23pDThFso8ATQVWJu37juE4Ut9VAeoKrp8nL3han9cSIuRkvoLsIzSQPKo70l4 OoF4vQSL1R1t6e6kDfJbJTmjeq/b775qauUmlgYhIfr11FYtpSJLQjk5nfAs/zGsPBlTYEdhNz+ +zIt1BPoN3Z6M7jt87rm4ZF4+zsg59Ltc6sdeZearqVxBN73R8CLwm9dF2ydPCoG295fTVOYN4O X-Google-Smtp-Source: AGHT+IGOjcfgNOPbuuXMXJkrlfZcidrF7TrotoJz/YOz1RT6WGzq1h7irRMPST7o4N3NxeSAaormrQ== X-Received: by 2002:a5d:6c6e:0:b0:385:fa20:6583 with SMTP id ffacd0b85a97d-388e4d313f2mr561776f8f.2.1734510979046; Wed, 18 Dec 2024 00:36:19 -0800 (PST) Received: from NAUSH-P-DELL.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c804a2f9sm13585781f8f.77.2024.12.18.00.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 00:36:18 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , David Plowman Subject: [PATCH v2 4/4] ipa: rpi: Provide the camera helper with the hardware configuration Date: Wed, 18 Dec 2024 08:34:21 +0000 Message-ID: <20241218083610.2397879-5-naush@raspberrypi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241218083610.2397879-1-naush@raspberrypi.com> References: <20241218083610.2397879-1-naush@raspberrypi.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a CamHelper::setHwConfig() helper used by the IPA to set the hardware configuration in use by the pipeline. This will be needed by the IMX500 camera helper in a future commit to determine if the metadata buffer is strided. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Acked-by: Kieran Bingham --- src/ipa/rpi/cam_helper/cam_helper.cpp | 5 +++++ src/ipa/rpi/cam_helper/cam_helper.h | 2 ++ src/ipa/rpi/common/ipa_base.cpp | 1 + 3 files changed, 8 insertions(+) diff --git a/src/ipa/rpi/cam_helper/cam_helper.cpp b/src/ipa/rpi/cam_helper/cam_helper.cpp index 6493e88232a4..1422a02e9953 100644 --- a/src/ipa/rpi/cam_helper/cam_helper.cpp +++ b/src/ipa/rpi/cam_helper/cam_helper.cpp @@ -156,6 +156,11 @@ void CamHelper::setCameraMode(const CameraMode &mode) } } +void CamHelper::setHwConfig(const Controller::HardwareConfig &hwConfig) +{ + hwConfig_ = hwConfig; +} + void CamHelper::getDelays(int &exposureDelay, int &gainDelay, int &vblankDelay, int &hblankDelay) const { diff --git a/src/ipa/rpi/cam_helper/cam_helper.h b/src/ipa/rpi/cam_helper/cam_helper.h index 4a4ab5e68cba..fb7eb3202e79 100644 --- a/src/ipa/rpi/cam_helper/cam_helper.h +++ b/src/ipa/rpi/cam_helper/cam_helper.h @@ -76,6 +76,7 @@ public: CamHelper(std::unique_ptr parser, unsigned int frameIntegrationDiff); virtual ~CamHelper(); void setCameraMode(const CameraMode &mode); + void setHwConfig(const Controller::HardwareConfig &hwConfig); virtual void prepare(libcamera::Span buffer, Metadata &metadata); virtual void process(StatisticsPtr &stats, Metadata &metadata); @@ -108,6 +109,7 @@ protected: std::unique_ptr parser_; CameraMode mode_; + Controller::HardwareConfig hwConfig_; private: /* diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp index 5fce17e67bd6..165c23c88d49 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -160,6 +160,7 @@ int32_t IpaBase::init(const IPASettings &settings, const InitParams ¶ms, Ini lensPresent_ = params.lensPresent; controller_.initialise(); + helper_->setHwConfig(controller_.getHardwareConfig()); /* Return the controls handled by the IPA */ ControlInfoMap::Map ctrlMap = ipaControls;