[{"id":15040,"web_url":"https://patchwork.libcamera.org/comment/15040/","msgid":"<YB/0eVdn9g69egOR@pendragon.ideasonboard.com>","date":"2021-02-07T14:08:57","subject":"Re: [libcamera-devel] [PATCH 6/7] ipa: raspberrypi: lux: Supply\n\tmissing method and remove atomic variable","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David,\n\nThank you for the patch.\n\nOn Thu, Feb 04, 2021 at 09:34:56AM +0000, David Plowman wrote:\n> Supply the missing SetCurrentAperture() method (even though no one is\n> calling it). If we did call it, it would be called synchronously so\n> the atomic variable is not required.\n> \n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/ipa/raspberrypi/controller/rpi/lux.cpp | 5 +++++\n>  src/ipa/raspberrypi/controller/rpi/lux.hpp | 3 +--\n>  2 files changed, 6 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/raspberrypi/controller/rpi/lux.cpp\n> index aefd92d4..f74381ca 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/lux.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/lux.cpp\n> @@ -46,6 +46,11 @@ void Lux::Read(boost::property_tree::ptree const &params)\n>  \tcurrent_aperture_ = reference_aperture_;\n>  }\n>  \n> +void Lux::SetCurrentAperture(double aperture)\n> +{\n> +\tcurrent_aperture_ = aperture;\n> +}\n> +\n>  void Lux::Prepare(Metadata *image_metadata)\n>  {\n>  \tstd::unique_lock<std::mutex> lock(mutex_);\n> diff --git a/src/ipa/raspberrypi/controller/rpi/lux.hpp b/src/ipa/raspberrypi/controller/rpi/lux.hpp\n> index 7b6c7258..f9090484 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/lux.hpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/lux.hpp\n> @@ -6,7 +6,6 @@\n>   */\n>  #pragma once\n>  \n> -#include <atomic>\n>  #include <mutex>\n>  \n>  #include \"../lux_status.h\"\n> @@ -34,7 +33,7 @@ private:\n>  \tdouble reference_aperture_; // units of 1/f\n>  \tdouble reference_Y_; // out of 65536\n>  \tdouble reference_lux_;\n> -\tstd::atomic<double> current_aperture_;\n> +\tdouble current_aperture_;\n>  \tLuxStatus status_;\n>  \tstd::mutex mutex_;\n>  };","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9B12DBD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  7 Feb 2021 14:09:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 665FD601B5;\n\tSun,  7 Feb 2021 15:09:23 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E7357601AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  7 Feb 2021 15:09:21 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B716FF3;\n\tSun,  7 Feb 2021 15:09:20 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"jpjXjbeU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1612706960;\n\tbh=KIeSKeZFKemltDpWzym2cksO7M4cMzvadNkMMfa++hY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=jpjXjbeULqg1i0Fs1eHyorBXp2LbSR+8B1BY9p0GoSgCcdAhZQmfn6l9QnWMqjYvZ\n\tCnvm4eD55cQ6SeH/3+bNONZ4zb7INvVCwnzlkBXVNw38vtPAC2ggr/LbgA36CLTSqe\n\tfTqS83S/n0Jm1jBcoVWhA20qelqwHoMXClmQZFAU=","Date":"Sun, 7 Feb 2021 16:08:57 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<YB/0eVdn9g69egOR@pendragon.ideasonboard.com>","References":"<20210204093457.6879-1-david.plowman@raspberrypi.com>\n\t<20210204093457.6879-7-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210204093457.6879-7-david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 6/7] ipa: raspberrypi: lux: Supply\n\tmissing method and remove atomic variable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]