From patchwork Thu Feb 18 12:48:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 11332 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 7310CBD1F6 for ; Thu, 18 Feb 2021 12:48:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 38C1B689BA; Thu, 18 Feb 2021 13:48:37 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="heWje3J7"; dkim-atps=neutral Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 705366836F for ; Thu, 18 Feb 2021 13:48:34 +0100 (CET) Received: by mail-wr1-x431.google.com with SMTP id a4so617020wro.8 for ; Thu, 18 Feb 2021 04:48:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jCN620akcDzN1LauegtIxBd2MKYranhSb0eYGC8Zu7g=; b=heWje3J77xCsr4cJN+5C4UBuRCca9HBEiMfrn0B9PvDJcVILNlFH0tryeryDAB1lpn KTpAiV0jnzxaLUCYJqKtXzdyoQUo6Qsi6n1x8Rj2DCYB9e1J3KS7FMhUX5nypw2cdKZD ecfgVojxhaWIdB4gWwLcF+IxbBPnXvuNuKJQqvC0+fCdX44FGugPdR/A0uWK7YQrO9RT YJTsWm1nKG8EGmXyKFvq5xnx8nwtZsXSMYfDftWKn8ddPSC7yw5AYPbZEjHMfU9UJqzL +/F0LGZUkKjxc9RbEjOOrzMMXg9JuZQsCfvhvRfuAtqvuiTyPCTg+OwSCYgVpPR8qevp uoNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jCN620akcDzN1LauegtIxBd2MKYranhSb0eYGC8Zu7g=; b=A1L19qazr1avHU8EeLGRVJgp1cxtYKrNkw3qf4lCYRkmqSp08FUrhjGw8r5WncZs2y a8y/P0+cDVtlQ/AFPWtIuqWPv8OyPl9TTDUgbimeijGvvbjiJDROGuSTT1WvoeHiknPX yAs7g/I+A3LziK08QjxLk1YflWiCQYbTmQpczO7elV2Hxf5DJatnM6M3UBu8yobx1ysG +24lRCrDFUzAjGRQ49uzFUVIvbor5hAo4acWd8vXn2f0Db3Lj8Aq6cPSoQeGTc5g8eId 5MUp/Wbf0JhlBbStU10a5YMrZ8vj24DuNAXVAiq8wSqHguQRhjZ3dPACiQWylbs42a2r Mkbg== X-Gm-Message-State: AOAM530X/xDtk25K+duswNeU38kHjbG/RVvjiSxjVqtuLo+oXgYDMVCV bBen9gdCeWXWiHp7hhcvPjzarjvfRxLPDsQp X-Google-Smtp-Source: ABdhPJx6htA1Iv0GBqEJju5JP1ZHeUatnAmppcHd2U8NOH5p4G0zf3XAlAQyOiSNug5KPW9Xq53gqA== X-Received: by 2002:adf:c6c1:: with SMTP id c1mr4209010wrh.326.1613652513793; Thu, 18 Feb 2021 04:48:33 -0800 (PST) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:15:c37b:2722:9ed2:1d58]) by smtp.gmail.com with ESMTPSA id z63sm7675876wme.8.2021.02.18.04.48.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 04:48:33 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Thu, 18 Feb 2021 12:48:22 +0000 Message-Id: <20210218124824.1825418-3-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210218124824.1825418-1-naush@raspberrypi.com> References: <20210218124824.1825418-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 2/4] pipeline: ipa: raspberrypi: Tidy-ups after IPAInterface changes 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" This commit addresses a couple of tidy-ups after the IPAInterface rework: - Rename ConfigStaggeredWrite -> ConfigSensorParams - Rename setIsp -> setIspControls There is no functional change in this commit. Signed-off-by: Naushir Patuck Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- include/libcamera/ipa/raspberrypi.mojom | 8 ++++---- src/ipa/raspberrypi/raspberrypi.cpp | 8 ++++---- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom index bab19a946e18..9c05cc68cceb 100644 --- a/include/libcamera/ipa/raspberrypi.mojom +++ b/include/libcamera/ipa/raspberrypi.mojom @@ -16,7 +16,7 @@ enum BufferMask { const uint32 MaxLsGridSize = 0x8000; enum ConfigOutputParameters { - ConfigStaggeredWrite = 0x01, + ConfigSensorParams = 0x01, }; struct SensorConfig { @@ -27,8 +27,8 @@ struct SensorConfig { }; struct ISPConfig { - uint32 embeddedbufferId; - uint32 bayerbufferId; + uint32 embeddedBufferId; + uint32 bayerBufferId; }; struct ConfigInput { @@ -126,6 +126,6 @@ interface IPARPiEventInterface { statsMetadataComplete(uint32 bufferId, ControlList controls); runIsp(uint32 bufferId); embeddedComplete(uint32 bufferId); - setIsp(ControlList controls); + setIspControls(ControlList controls); setDelayedControls(ControlList controls); }; diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 81a3195c82e9..974f4ec63058 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -344,7 +344,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo, helper_->GetDelays(exposureDelay, gainDelay); sensorMetadata = helper_->SensorEmbeddedDataPresent(); - result->params |= ipa::rpi::ConfigStaggeredWrite; + result->params |= ipa::rpi::ConfigSensorParams; result->sensorConfig.gainDelay = gainDelay; result->sensorConfig.exposureDelay = exposureDelay; result->sensorConfig.vblank = exposureDelay; @@ -447,11 +447,11 @@ void IPARPi::signalIspPrepare(const ipa::rpi::ISPConfig &data) * avoid running the control algos for a few frames in case * they are "unreliable". */ - prepareISP(data.embeddedbufferId); + prepareISP(data.embeddedBufferId); frameCount_++; /* Ready to push the input buffer into the ISP. */ - runIsp.emit(data.bayerbufferId & ipa::rpi::MaskID); + runIsp.emit(data.bayerBufferId & ipa::rpi::MaskID); } void IPARPi::reportMetadata() @@ -968,7 +968,7 @@ void IPARPi::prepareISP(unsigned int bufferId) applyDPC(dpcStatus, ctrls); if (!ctrls.empty()) - setIsp.emit(ctrls); + setIspControls.emit(ctrls); } } diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 75d57c2a2ffd..aac285b44748 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -152,7 +152,7 @@ public: void statsMetadataComplete(uint32_t bufferId, const ControlList &controls); void runIsp(uint32_t bufferId); void embeddedComplete(uint32_t bufferId); - void setIsp(const ControlList &controls); + void setIspControls(const ControlList &controls); void setDelayedControls(const ControlList &controls); /* bufferComplete signal handlers. */ @@ -1172,7 +1172,7 @@ int RPiCameraData::loadIPA() ipa_->statsMetadataComplete.connect(this, &RPiCameraData::statsMetadataComplete); ipa_->runIsp.connect(this, &RPiCameraData::runIsp); ipa_->embeddedComplete.connect(this, &RPiCameraData::embeddedComplete); - ipa_->setIsp.connect(this, &RPiCameraData::setIsp); + ipa_->setIspControls.connect(this, &RPiCameraData::setIspControls); ipa_->setDelayedControls.connect(this, &RPiCameraData::setDelayedControls); IPASettings settings(ipa_->configurationFile(sensor_->model() + ".json")); @@ -1241,7 +1241,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config) return -EPIPE; } - if (result.params & ipa::rpi::ConfigStaggeredWrite) { + if (result.params & ipa::rpi::ConfigSensorParams) { /* * Setup our delayed control writer with the sensor default * gain and exposure delays. @@ -1336,7 +1336,7 @@ void RPiCameraData::embeddedComplete(uint32_t bufferId) handleState(); } -void RPiCameraData::setIsp(const ControlList &controls) +void RPiCameraData::setIspControls(const ControlList &controls) { ControlList ctrls = controls; @@ -1692,8 +1692,8 @@ void RPiCameraData::tryRunPipeline() << " Embedded buffer id: " << embeddedId; ipa::rpi::ISPConfig ispPrepare; - ispPrepare.embeddedbufferId = ipa::rpi::MaskEmbeddedData | embeddedId; - ispPrepare.bayerbufferId = ipa::rpi::MaskBayerData | bayerId; + ispPrepare.embeddedBufferId = ipa::rpi::MaskEmbeddedData | embeddedId; + ispPrepare.bayerBufferId = ipa::rpi::MaskBayerData | bayerId; ipa_->signalIspPrepare(ispPrepare); }