[{"id":15000,"web_url":"https://patchwork.libcamera.org/comment/15000/","msgid":"<YBxvWhW3B9gNRwOG@pendragon.ideasonboard.com>","date":"2021-02-04T22:04:10","subject":"Re: [libcamera-devel] [PATCH 2/2] pipeline: raspberrypi: Always\n\tsave sensor params on IPA_RESULT_SENSOR_PARAMS","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nThank you for the patch.\n\nOn Mon, Feb 01, 2021 at 12:56:33PM +0000, Naushir Patuck wrote:\n> Fixup logic when handling IPA_RESULT_SENSOR_PARAMS where we must always\n> overwrite the parameters if provided by IPA. In the current codebase,\n> this only happens once on startup, so there is no effective functional\n> difference. But this change allows the option for the IPA to request new\n> sensor parameters per-mode if required.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  .../pipeline/raspberrypi/raspberrypi.cpp         | 16 +++++++---------\n>  1 file changed, 7 insertions(+), 9 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 48e5943edc1a..63bdbe2b91bd 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -1224,17 +1224,15 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n>  \t\t * Setup our delayed control writer with the sensor default\n>  \t\t * gain and exposure delays.\n>  \t\t */\n> -\t\tif (!delayedCtrls_) {\n> -\t\t\tstd::unordered_map<uint32_t, unsigned int> delays = {\n> -\t\t\t\t{ V4L2_CID_ANALOGUE_GAIN, result.data[resultIdx++] },\n> -\t\t\t\t{ V4L2_CID_EXPOSURE, result.data[resultIdx++] },\n> -\t\t\t\t{ V4L2_CID_VBLANK, result.data[resultIdx++] }\n> -\t\t\t};\n> +\t\tstd::unordered_map<uint32_t, unsigned int> delays = {\n> +\t\t\t{ V4L2_CID_ANALOGUE_GAIN, result.data[resultIdx++] },\n> +\t\t\t{ V4L2_CID_EXPOSURE, result.data[resultIdx++] },\n> +\t\t\t{ V4L2_CID_VBLANK, result.data[resultIdx++] }\n> +\t\t};\n>  \n> -\t\t\tdelayedCtrls_ = std::make_unique<DelayedControls>(unicam_[Unicam::Image].dev(), delays);\n> +\t\tdelayedCtrls_ = std::make_unique<DelayedControls>(unicam_[Unicam::Image].dev(), delays);\n>  \n> -\t\t\tsensorMetadata_ = result.data[resultIdx++];\n> -\t\t}\n> +\t\tsensorMetadata_ = result.data[resultIdx++];\n>  \t}\n>  \n>  \tif (result.operation & RPi::IPA_RESULT_SENSOR_CTRLS) {","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 D9664BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Feb 2021 22:04:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A6DFF61430;\n\tThu,  4 Feb 2021 23:04:35 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1938061430\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 Feb 2021 23:04:34 +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 8FC78510;\n\tThu,  4 Feb 2021 23:04:33 +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=\"jpI/373K\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1612476273;\n\tbh=I8/wZ5kJaB0cr90gWQtBdxbi8wwImjDr8ybv42RWcO8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=jpI/373KcQzhklG7hGAd571osesxY5dqG/BXh7pZB8gt0ZtECkXEIpwrmZnjwrnr3\n\tFBBtjNlRt3r1U43xalXAGdd2veKqfLaJD5cXW0kvw+IcASnB9e7e7EVxf5RBi84wFb\n\tTWXKqjKAt77iL687odm7MpWToATkkMZTr6DWUOhY=","Date":"Fri, 5 Feb 2021 00:04:10 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<YBxvWhW3B9gNRwOG@pendragon.ideasonboard.com>","References":"<20210201125633.26242-1-naush@raspberrypi.com>\n\t<20210201125633.26242-2-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210201125633.26242-2-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 2/2] pipeline: raspberrypi: Always\n\tsave sensor params on IPA_RESULT_SENSOR_PARAMS","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>"}}]