From patchwork Fri Oct 13 07:48:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 19128 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 A174FC32B8 for ; Fri, 13 Oct 2023 07:48:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 80C386297E; Fri, 13 Oct 2023 09:48:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1697183333; bh=rxVei+/bCJL0Jded4ibv1g3xlqNCQ9dDIFL/A3oIamA=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=t0xnbzWLU0Dc+vsDT1DV8sssH1mw2EjlPutGeoi4rowQcZMEt7at/TxFnfjo9rAno YN8zWnAQ2oW/PtWAFSNXg1q1weyu40/lnI6+QTd/h2inxZpJUF0K1cx7Ma2POWZy9F MN+JUfCYqCYS1sxU3HlNnP8Zhq37jIJUOb9tZDXx426xQdhhBwH+ZDTSZ+TJgE//rf GpUF2BS0WAEqnPrycIMzYQEaol4mMBX2qpNHtC1waEEgGGeASKNzVv63+LJSksZOKl k9wPpT7D72SHORKZmvw80tGooh9ukOxdbydf0/B4xwri6iBSLJa7L8G5ojsggg5uyl leYfFSChuSNCg== Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4186462980 for ; Fri, 13 Oct 2023 09:48:50 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="YnDExHuX"; dkim-atps=neutral Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-31f71b25a99so1697576f8f.2 for ; Fri, 13 Oct 2023 00:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1697183329; x=1697788129; 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=kUh7r73vgyaw/ga4Ir8ecXHXGWBguUKt7Z76Z8tysMU=; b=YnDExHuXlTh+UBbdWeLtW2mB9K4FmKa1227Wk8nqNefhyoYOwYcE1JSVJIB3Yhapjy 81XOkONTRAK6FV0gK3yRLCJ+gaHlGIVmoo4unnTxi76AaTQ7n6HzSui9DUa0rP81sNHR ceZRV/UWTyJfi6T4iZq0/epToILXAMrNAqzgoEHViUs93sIsRfQ2i2SdpjziM3ngIR7s fjjZg3I0SVh63ECqgykVlD77YSLc/o54PH/wN8Wz0yiUGHoo8mZWgEPgsBkVkpthN+Js Mz5DrLlzKH3l4Qt6YTuqgGtG4j+nCBP63RuP/e1bgBXStaWAMpdK2JJxvDdRSTbRz0I0 NVgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697183329; x=1697788129; 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=kUh7r73vgyaw/ga4Ir8ecXHXGWBguUKt7Z76Z8tysMU=; b=Lu0ib9dMXMFwI+O7rQAUfN1Hxxd9de0gXR2RbJstWwqc/9kMWzxWgVJNGnEvz1XdgZ 2P/z/WPas8PF0raj0WSE5RM1d4VKpsqeJnyz0ZiW3KMdQY6pcdCwyCWpIQbMSDygEnzG mVuUAT6WjKLfaDW3ra9/T8BU/pV3gtPnmJuiV/rsmozka5L8aErDfsu0hGwIp07ObdUp Ob6B7xxGfrZD5cpp7T+t/JkWGVayeeJqVIhlMkT9xZwvGW9g4HTJ1q7ml1qSzDtdhSTG 3C+7og1a/TEvZYeOCZksaXp7Val4AeK9YR6nTPJSAS2wwCL+bq6qONbf/RZkpNUzMDgx QuKQ== X-Gm-Message-State: AOJu0YwRMIRICnaEB2en6wJkYXudcGA8hcksxuoQ5KTPSSr8GGlI90Tr eeblZgtOMyehw/Fj04qvQy6ImAuQqymHcslqhYjHWA== X-Google-Smtp-Source: AGHT+IFugMizvcTpEW+nLBMAHZUDyrGkXzxZQaxQxKudxsop3NxvlTgoJ00cyuxdgHn1sTFbxT+PMA== X-Received: by 2002:a05:6000:24a:b0:32d:9337:e7d4 with SMTP id m10-20020a056000024a00b0032d9337e7d4mr3044736wrz.9.1697183329615; Fri, 13 Oct 2023 00:48:49 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id m16-20020a7bca50000000b003fee6e170f9sm1791890wml.45.2023.10.13.00.48.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 00:48:49 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Fri, 13 Oct 2023 08:48:25 +0100 Message-Id: <20231013074841.16972-5-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013074841.16972-1-naush@raspberrypi.com> References: <20231013074841.16972-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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 Cc: Jacopo Mondi 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;