From patchwork Fri Dec 13 09:38:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 22311 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 E0C9BC32EA for ; Fri, 13 Dec 2024 09:46:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 73CFB67EEB; Fri, 13 Dec 2024 10:46:19 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="RwrC66A6"; dkim-atps=neutral Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 649DB67EED for ; Fri, 13 Dec 2024 10:46:12 +0100 (CET) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4361aa6e517so1799315e9.2 for ; Fri, 13 Dec 2024 01:46:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1734083172; x=1734687972; 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=dMqIeHktniCC3ksS/cr/kuwcUfMRJ47Oehi3rhiipek=; b=RwrC66A698Fxt/oCp1Dxv+6qn8x8L9EGMuK1/8iqqDmQDpDYUZd0aU60zeOf5wfCHb eqAuSnoIZl5BS3sSivFZP69G2v7q1lXK01XUzn9bjsoAlJNt57Z40P+L+Cx9IMoBNLho vTYqZHhppMc19l33PZAAG7nwgBeq3hequcicD9BW1n7fvSZsu07J84vmFY6kT1m/h2D9 jGNWuYEPTsjojoMYE3eRAgemxlliy5kzi50aT6ej1nlUTAecJhrTjwui4tmMJpC2vuLk 8/P/SFNSzwsISdrSP/UB2bpa0PxGja7nglSbhNMIu/gMoCcCHlwcxIL7FENAPCYWrnka Higg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734083172; x=1734687972; 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=dMqIeHktniCC3ksS/cr/kuwcUfMRJ47Oehi3rhiipek=; b=TIH7/OWyo+5DapEZfBSKvl2WijVciva2p4PdiA4eLhjlf2yDItLaN+3uVDFVcX/H36 N3DUvvc5Phh1GL35GejvEt+WIYyi0/NacVxGVDfMxBlQESiG/470ArlepjeaF7MHCOio HtciLwOJ04xHdYUE+D8OTnihBIlh0i625LODnBzU7mDIufpxgMdM/U8HJ+E6DAEd3ShG HyF0GpvGVhrvqP8OtnYKy5ojyWGvdUszGA9PwMrECTi0RInqRP4jpWgey6EzDS1bprh0 gU6bnlQK11iJWld5poPuDoaanFObf+/TlOr849HIZkkJMH2QJjPchRaXqNs9H6bS8rHO H5dQ== X-Gm-Message-State: AOJu0YxDJJyZBc+k9iY2V/LBeFhEo+fn4n9NULoV+RdlU5YRG03fCn+t GvWH5WUWjoEKO5DW/62PMXj7XQZ0O5gjJx2jPvzhLAqEMMs0ApihUO6n+7UVeOQAoHyd8TrPfUn 8 X-Gm-Gg: ASbGnctjsw8sFN31RzmA5ZhuNFLVqba3AsQMXA3tnROJ8zlC24zWDRCpbOKoAIvzyAB TtiBiCUyzfft9PGEAw/tPxISWF33Z09y8o5adfILxWOX9YPXo2+YexyYX5hXZlD93T080RJjuCM 2dfp6WauFqoWV6PBmIrb9WHIjTMSp90raiPjgGgkQWEA3ic2LWCW/N+j6/hiERH8QOUWcy3UtfM sRL1Vqj5syi/d4OX885JocKcjRQWfsFWTOpzHQW9YHolq9KbKdrZkxeMQx2GifcGlXL9n0MUeP4 X-Google-Smtp-Source: AGHT+IHbxI9uKHgNhARwbk6XqNL9HGf/xOTOOAkFKuI6o61lV/O2/jHsjZeZwNMvuBP3IVCY41zmMg== X-Received: by 2002:a05:600c:4ed4:b0:436:1b94:2de5 with SMTP id 5b1f17b1804b1-4362aaa18damr5145315e9.5.1734083171674; Fri, 13 Dec 2024 01:46:11 -0800 (PST) Received: from NAUSH-P-DELL.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4362557c502sm43989105e9.11.2024.12.13.01.46.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 01:46:11 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck Subject: [PATCH 6/6] ipa: rpi: Provide the camera helper with the hardware configuration Date: Fri, 13 Dec 2024 09:38:29 +0000 Message-ID: <20241213094602.2083174-7-naush@raspberrypi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241213094602.2083174-1-naush@raspberrypi.com> References: <20241213094602.2083174-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 configuartion 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 --- 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 b3656cbc730b..a7d27ef66ec4 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -161,6 +161,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;