[{"id":12233,"web_url":"https://patchwork.libcamera.org/comment/12233/","msgid":"<20200831233635.GZ16155@pendragon.ideasonboard.com>","date":"2020-08-31T23:36:35","subject":"Re: [libcamera-devel] [PATCH v5 1/8] libcamera: pipeline:\n\traspberrypi: Revert \"Set sensor default orientation before\n\tconfigure()\"","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 Sat, Aug 29, 2020 at 12:54:22PM +0100, David Plowman wrote:\n> This reverts commit 1e8c91b65695449c5246d17ba7dc439c8058b781.\n> \n> Now that we shall be implementing application-defined 2D transforms\n> it's no longer possible to set the sensor orientation so early on. We\n> have to wait until we have the CameraConfiguration object as that's\n> where the application puts its choice of transform.\n> \n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n\nMakes sense.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 14 +++++++-------\n>  1 file changed, 7 insertions(+), 7 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index c1451e7..42c9caa 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -960,13 +960,6 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n>  \t/* Initialize the camera properties. */\n>  \tdata->properties_ = data->sensor_->properties();\n>  \n> -\t/* Configure the H/V flip controls based on the sensor rotation. */\n> -\tControlList ctrls(data->unicam_[Unicam::Image].dev()->controls());\n> -\tint32_t rotation = data->properties_.get(properties::Rotation);\n> -\tctrls.set(V4L2_CID_HFLIP, static_cast<int32_t>(!!rotation));\n> -\tctrls.set(V4L2_CID_VFLIP, static_cast<int32_t>(!!rotation));\n> -\tdata->unicam_[Unicam::Image].dev()->setControls(&ctrls);\n> -\n>  \t/*\n>  \t * List the available output streams.\n>  \t * Currently cannot do Unicam streams!\n> @@ -1171,6 +1164,13 @@ int RPiCameraData::configureIPA()\n>  \t\t\t\t\t      { V4L2_CID_EXPOSURE, result.data[1] } });\n>  \t\t\tsensorMetadata_ = result.data[2];\n>  \t\t}\n> +\n> +\t\t/* Configure the H/V flip controls based on the sensor rotation. */\n> +\t\tControlList ctrls(unicam_[Unicam::Image].dev()->controls());\n> +\t\tint32_t rotation = sensor_->properties().get(properties::Rotation);\n> +\t\tctrls.set(V4L2_CID_HFLIP, static_cast<int32_t>(!!rotation));\n> +\t\tctrls.set(V4L2_CID_VFLIP, static_cast<int32_t>(!!rotation));\n> +\t\tunicam_[Unicam::Image].dev()->setControls(&ctrls);\n>  \t}\n>  \n>  \tif (result.operation & RPI_IPA_CONFIG_SENSOR) {","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 DE11CBDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 31 Aug 2020 23:36:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6278661EA0;\n\tTue,  1 Sep 2020 01:36:59 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7D1C661EA0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  1 Sep 2020 01:36:57 +0200 (CEST)","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 07A06255;\n\tTue,  1 Sep 2020 01:36:56 +0200 (CEST)"],"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=\"b8BqTh7a\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1598917017;\n\tbh=64wGHowfD7yy4aAI4aSuzHVpaK9TgaLumVc6X623mAI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=b8BqTh7a1npTUjPS0ImnPEIqJmPpEpgvotzYvqXnkicW2mmTd/lcBHRP9JIEjGk7w\n\tpuE810KB1GECDnYzA6JynaUQ2VavIl4zEpDxKH+w3RuKh1LbVarw75B2DUR30gsPT6\n\tRyteoWdVBIszFFtuOKgRDIdNrAS7j764ucFZsSgM=","Date":"Tue, 1 Sep 2020 02:36:35 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<20200831233635.GZ16155@pendragon.ideasonboard.com>","References":"<20200829115429.30010-1-david.plowman@raspberrypi.com>\n\t<20200829115429.30010-2-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200829115429.30010-2-david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v5 1/8] libcamera: pipeline:\n\traspberrypi: Revert \"Set sensor default orientation before\n\tconfigure()\"","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>"}}]