From patchwork Fri Oct 6 13:19:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 19106 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 B2BA8BD808 for ; Fri, 6 Oct 2023 13:20:04 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 60E6762971; Fri, 6 Oct 2023 15:20:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1696598404; bh=9ZDDvTxPOZsT2Xs9ZsTNX9mUbI9BoXmsCquizANYbFQ=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=uUGaFpAOyl6f4sVuWYcbJIKSbAf4KTGFdcOwUvzlsZ6xVt1hkssap9vnKs/toHGmr kCevA3g2ztTEmQt2IqLITD5Sl0JzVkGWY40DdGNfq2KrBh99iqTMVTcICww8vWTA3Q c1a5i5OgvcQoC5+cJGNKRSzEAczA5xdLe/kNQLilJ6U3zN62rIijs8MrYrTD1YC38x RlFS54PgSKFqMdYXda+bsdNhjE7T+wAxhprERe7eTR2r+bCOjPa+U7sCIxEsj7rejg +284VdWe+anU/RaMlOwK1gyiS2bVyOVuuXFnlGBhl3Rj0tqIErWy+1mOhBRVe8X3fb kxwmwjvfY0znQ== Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8CFBC6296B for ; Fri, 6 Oct 2023 15:20:01 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="fO0JsH3M"; dkim-atps=neutral Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-406619b53caso18758485e9.1 for ; Fri, 06 Oct 2023 06:20:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1696598401; x=1697203201; 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=3C7R0572Ac27bu5Wt1ogqZJgDpUoBbC5YoWlWcVDKLY=; b=fO0JsH3MV/1znDZDChDmkH83d50fmBZD96h9M7LdY7JB1y/NMF+I4nnNtShJdEpNam BQPqUTed3KcB3gl8TMHgIWl0/BaCk7yoxB+tkdlv3dpEqMuWHuE1k8UIwnQ79Y2e1/EV tCk13Xs+zFGzB8R3DwTOC8+BrU4HJTMEIANzYUwP+eJ8u0+7+edhVGV2jBZK40xoEA2F w4HNsgjGlhCIdwKFVPcHOIC16vAwrbM7/E+PG5V/btu4idzky4DMvdFQ2ju3ySp1Z3C2 m2T1uiQ0Nlf9k7Zb0KX94+NC6MQAyAholIG3d1KQayQFUBFralEM4oSZIjBtp/5yiW1R 7/oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696598401; x=1697203201; 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=3C7R0572Ac27bu5Wt1ogqZJgDpUoBbC5YoWlWcVDKLY=; b=rUeMhanboa75hiDr998tgsdikw9y4Csao/i47MVQb2OORaYLUFYeRX7kbB6kmFiegp ztUtLvk54iwN+e5YBU4ShAe6suEqyCZWoh1JZ/ImEVHCETdK+xmvwmvWncP5K9ggmWum LGqrKLVVVV7+MK6X+YZhS9ZCYjKybUKSmB/M2Vuaf+vbJalUT2UYzYTTBXapM7PWhy+E inNVMl8Jm6dXL0/aBae/CK02VVGSX6y0ME5zujHgzsnVREbZFFCTlxkexiZ62XkMgpQh /OCOFKal0scZrLAgBt/NJgq0beTAzsOKc1tBfOpfeuvc1kFgqKn1bT2Di/Z30A4xxj8a CjsA== X-Gm-Message-State: AOJu0Yx1BmZOhJbkr9TsOpcSgZH9UMVLYlm9mg7D1O0UfRbi/WUNTfmL fM8Lsa7q0fvQThnv3hWaz/MQV1KDy+imQjxSmISf+g== X-Google-Smtp-Source: AGHT+IGQnXIGs0ckmEpBHr8qKRiW5OpYZ8s1DtQFZ22L/8SRpwTW+D2PlMXoYB2hiIdoqUrSsQZnBg== X-Received: by 2002:adf:f404:0:b0:31c:3136:60af with SMTP id g4-20020adff404000000b0031c313660afmr6428510wro.61.1696598400999; Fri, 06 Oct 2023 06:20:00 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id m8-20020a056000180800b00321773bb933sm1639478wrh.77.2023.10.06.06.19.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 06:20:00 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Fri, 6 Oct 2023 14:19:44 +0100 Message-Id: <20231006132000.23504-5-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231006132000.23504-1-naush@raspberrypi.com> References: <20231006132000.23504-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 04/20] ipa: rpi: Add IpaBase::platformStart() member function 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: , X-Patchwork-Original-From: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a virtual IpaBase::platformStart() member function that is called at the end of IpaBase::start(). For the IpaVc4 derived class, this function does nothing, but will be used in the PiSP derived class to reset internal state on startup. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Jacopo Mondi --- src/ipa/rpi/common/ipa_base.cpp | 2 ++ src/ipa/rpi/common/ipa_base.h | 1 + src/ipa/rpi/vc4/vc4.cpp | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp index 5df1998c8113..5939fe57f040 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -341,6 +341,8 @@ void IpaBase::start(const ControlList &controls, StartResult *result) firstStart_ = false; lastRunTimestamp_ = 0; + + platformStart(controls, result); } void IpaBase::mapBuffers(const std::vector &buffers) diff --git a/src/ipa/rpi/common/ipa_base.h b/src/ipa/rpi/common/ipa_base.h index 097f436af93b..eaa9f71182ed 100644 --- a/src/ipa/rpi/common/ipa_base.h +++ b/src/ipa/rpi/common/ipa_base.h @@ -67,6 +67,7 @@ private: static constexpr unsigned int numMetadataContexts = 16; virtual int32_t platformInit(const InitParams ¶ms, InitResult *result) = 0; + virtual int32_t platformStart(const ControlList &controls, StartResult *result) = 0; virtual int32_t platformConfigure(const ConfigParams ¶ms, ConfigResult *result) = 0; virtual void platformPrepareIsp(const PrepareParams ¶ms, diff --git a/src/ipa/rpi/vc4/vc4.cpp b/src/ipa/rpi/vc4/vc4.cpp index 1de0d3ccdc44..4a4d720ce7dd 100644 --- a/src/ipa/rpi/vc4/vc4.cpp +++ b/src/ipa/rpi/vc4/vc4.cpp @@ -51,6 +51,7 @@ public: private: int32_t platformInit(const InitParams ¶ms, InitResult *result) override; + int32_t platformStart(const ControlList &controls, StartResult *result) override; int32_t platformConfigure(const ConfigParams ¶ms, ConfigResult *result) override; void platformPrepareIsp(const PrepareParams ¶ms, RPiController::Metadata &rpiMetadata) override; @@ -94,6 +95,12 @@ int32_t IpaVc4::platformInit([[maybe_unused]] const InitParams ¶ms, [[maybe_ return 0; } +int32_t IpaVc4::platformStart([[maybe_unused]] const ControlList &controls, + [[maybe_unused]] StartResult *result) +{ + return 0; +} + int32_t IpaVc4::platformConfigure(const ConfigParams ¶ms, [[maybe_unused]] ConfigResult *result) { ispCtrls_ = params.ispControls;