From patchwork Thu Feb 4 09:34:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 11136 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 00C72BD162 for ; Thu, 4 Feb 2021 09:35:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C066B6141D; Thu, 4 Feb 2021 10:35:09 +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="p4imPPgj"; dkim-atps=neutral Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 780E861414 for ; Thu, 4 Feb 2021 10:35:06 +0100 (CET) Received: by mail-wr1-x432.google.com with SMTP id m13so2616510wro.12 for ; Thu, 04 Feb 2021 01:35:06 -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=W0ndmTmLHTj+yjrjIbV9XFfDITNN9s+r1ID3eo4YSJY=; b=p4imPPgjZfCtEMbzauzuSbKgbpmYv6jlBy//gfQkxCxlWLbRFcfrr7FtnVrN4vGgot 63Vqw1TdIU+nwOSnsiFgh2dzayJBCmS07wInEdheY/FaO2DGyqXVUcogFmzWqxD6m2gu DOgfXOZiMEGQ0ouPVG0v2M4XUnyA2aJPdK5aA3NI7hnzsFoHAniXAODpBfX3+ZaIBNW7 xQxVCKuPz/YhtI1UrcpJoovNiCAzjt78muz0eHFGzmXrS5g7yQlC+go+Fi7zKGWzpnde by8fZRMVtPZGq1j6tAIkio3TQjkxmI+98Z2iBr1qPYnYbhS03oyqNFJYz+QIMansBKF5 iRaQ== 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=W0ndmTmLHTj+yjrjIbV9XFfDITNN9s+r1ID3eo4YSJY=; b=Pftn5ZOP2O8xOUGpN+PsT9rUOG5ItAOq4MWHM5MCyywF2RfX1IW4fyBzkGVc5WzE2b NpVV6qCWYR92S6Ggn/rwAzEX9j5y5V/Sz9lsSKkn19NbkNix9pT4Y9O5WIF/JjE6hyOE SlOcTWi8GKSnGLK0NBmh+nMJJ3Rgh3kdD5/qfWi0zt6ayAnUJNC5ctX6F0+Udclo2Ic0 4wFJ0d7bVoga/e7UWGPdeHs5ezTeeJeBgEdJdFkof8c23ckrfT3aDHdbf0v6BBlEQkoW JN4SMdbkEzbxV400ITN7eN7Qp9frgkbwtWDaYAk4d/6jfqQM59ZwXMmHrOYafbU3wDqs T20Q== X-Gm-Message-State: AOAM532YipSJY/zIaZyBaxIuKQe40SeoNbZLph2ENyaWhCoRgMSpWlrX dLFrVKdF5qPj5PzKj4e8nZRpusIZnrp6gmSK X-Google-Smtp-Source: ABdhPJzyi8XSi3yLTYPUAZMtM61Drzdxr6uyaoKx6HMmxB1nRsYeC0Meoa4On2W4Pt0sgEwbczz/Qw== X-Received: by 2002:a5d:640c:: with SMTP id z12mr8280944wru.342.1612431305970; Thu, 04 Feb 2021 01:35:05 -0800 (PST) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id g16sm5280580wmi.30.2021.02.04.01.35.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 01:35:05 -0800 (PST) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Thu, 4 Feb 2021 09:34:56 +0000 Message-Id: <20210204093457.6879-7-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210204093457.6879-1-david.plowman@raspberrypi.com> References: <20210204093457.6879-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 6/7] ipa: raspberrypi: lux: Supply missing method and remove atomic variable 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" Supply the missing SetCurrentAperture() method (even though no one is calling it). If we did call it, it would be called synchronously so the atomic variable is not required. Signed-off-by: David Plowman Reviewed-by: Laurent Pinchart --- src/ipa/raspberrypi/controller/rpi/lux.cpp | 5 +++++ src/ipa/raspberrypi/controller/rpi/lux.hpp | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/raspberrypi/controller/rpi/lux.cpp index aefd92d4..f74381ca 100644 --- a/src/ipa/raspberrypi/controller/rpi/lux.cpp +++ b/src/ipa/raspberrypi/controller/rpi/lux.cpp @@ -46,6 +46,11 @@ void Lux::Read(boost::property_tree::ptree const ¶ms) current_aperture_ = reference_aperture_; } +void Lux::SetCurrentAperture(double aperture) +{ + current_aperture_ = aperture; +} + void Lux::Prepare(Metadata *image_metadata) { std::unique_lock lock(mutex_); diff --git a/src/ipa/raspberrypi/controller/rpi/lux.hpp b/src/ipa/raspberrypi/controller/rpi/lux.hpp index 7b6c7258..f9090484 100644 --- a/src/ipa/raspberrypi/controller/rpi/lux.hpp +++ b/src/ipa/raspberrypi/controller/rpi/lux.hpp @@ -6,7 +6,6 @@ */ #pragma once -#include #include #include "../lux_status.h" @@ -34,7 +33,7 @@ private: double reference_aperture_; // units of 1/f double reference_Y_; // out of 65536 double reference_lux_; - std::atomic current_aperture_; + double current_aperture_; LuxStatus status_; std::mutex mutex_; };