From patchwork Wed Jan 8 11:09:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 22471 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 C3CE4C32F0 for ; Wed, 8 Jan 2025 11:10:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 92CB868503; Wed, 8 Jan 2025 12:10:42 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Y9nI8gtq"; dkim-atps=neutral Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6FB8D684E4 for ; Wed, 8 Jan 2025 12:10:38 +0100 (CET) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4361e82e3c3so25989205e9.0 for ; Wed, 08 Jan 2025 03:10:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1736334638; x=1736939438; 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=353pXkmOOArp5EYfEz09P8Q//IsEvbXNQ4sKh5FVhgU=; b=Y9nI8gtqQ9SFwQx5UsY2w4rb0tKSskivRxO+YwYdY0TfyNSr3QCq4lAXpVWaz77yTj ffZmdghb3EOYn+3Off2OnPJzbKkeUyeBMZEOo43OuSy540YX2zhGxGp/rIrkcgQwuWG/ jBvO1q+RWugwuZ3+TpUwOV5X1ujdv7JAaFU3lUgTkdNsExgz6ykRyaU6qSlZsMB3p5lo oNX6ijCMfljs2dxvsI7+kGFG5XhMxbRHQIG4yxLCmP0Z/HocmOvw38UuvlsSxDicHqdA 88jj0TZVxxl08dOkC+9NEx/gVftblbuzkBIb390spwaLjjR+BtpFIqQbCstGpqf186TS Czvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736334638; x=1736939438; 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=353pXkmOOArp5EYfEz09P8Q//IsEvbXNQ4sKh5FVhgU=; b=JKFNo7ZQKjdodAizIqHlE1eqUgsdmwJgM/713JJuqrXyb2ZC4qAj4YpsIet5g9VGKc oY7OJagf+f+Bv5IssBBJKaYZpaebdee8660pqy8q9C/si5/axDCEOyk1rw7s/NM54aVN ZNhZVcCdhCX6CgVzm8rrZzFFrNy2W5yEnc/AcMLNRkDEOVeHLcLQSk7OmXakrMU0l2Gd fJloKY+7Fn8Zw93Gpy0VuZWTNdcEd2z0PQ3GJJCyMfkbnL8SDurKGCNf2dAcBCiaJptf VGmJr7+TPPyMZGpL0iaNZw6PiFyh5U3kOptOYQzUPZzH1bFOvRYi26WtZ2b+WQ4L9n8w BccA== X-Gm-Message-State: AOJu0YxzsEpWpl3Sf6EcVM4qjskvyT6phjPdxVDGFJfss9wHpOr7rO8+ xkwHLx0uk1SSVfPtm6NAczdRn3kr6Vdmug0dfiWQHfE+i2zZcZm836xlPp7DBUWHyLaupSEiqkS R+0U= X-Gm-Gg: ASbGncuncv8gxIlBAd33q6D/klE9K4nO9xnMKcBbzY7TshSZcrloLzq32d5DtEwmD7a jmnEjJW25zwokvPvLVJoYxi8IXpqtECsq3kqucwZfYsL1+EwGU24wCn/uCNmlu4y4HU9r/hff36 KZi6LlhxstxRELeJEQT/2s4+JKN4nr3FCl7GxRP8Fy+LYTzcAKsjpo+k5vDu8/c+laH3FUbr4Qz LnuAPtf6gm5xRXltGwCMRCbOYOAKbWwnFr3mINw7jM4X5dScxetZCpQrsFxnZyEFrgmvfHWp5wa X-Google-Smtp-Source: AGHT+IHjG5VvkSKARqDCVyE8SB9sXAJ1EZeERA/DmlJCzen48VBcqRi9T4syq/tMPcRKaj/eXvTFxw== X-Received: by 2002:a05:600c:1385:b0:436:1b94:2deb with SMTP id 5b1f17b1804b1-436e26f556fmr7452645e9.5.1736334637668; Wed, 08 Jan 2025 03:10:37 -0800 (PST) Received: from NAUSH-P-DELL.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e2ddefcbsm17141325e9.22.2025.01.08.03.10.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 03:10:37 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , David Plowman , Kieran Bingham Subject: [PATCH v3 4/4] ipa: rpi: Provide the camera helper with the hardware configuration Date: Wed, 8 Jan 2025 11:09:36 +0000 Message-ID: <20250108111030.3257931-5-naush@raspberrypi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250108111030.3257931-1-naush@raspberrypi.com> References: <20250108111030.3257931-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 8c720652fbd0..a78db9c1cd7c 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; +} + bool CamHelper::sensorEmbeddedDataPresent() const { return false; diff --git a/src/ipa/rpi/cam_helper/cam_helper.h b/src/ipa/rpi/cam_helper/cam_helper.h index 29371bdbf5ea..4a826690ec65 100644 --- a/src/ipa/rpi/cam_helper/cam_helper.h +++ b/src/ipa/rpi/cam_helper/cam_helper.h @@ -71,6 +71,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); @@ -101,6 +102,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 0c8aee699155..6ff1e22b15d4 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -151,6 +151,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;