[{"id":12324,"web_url":"https://patchwork.libcamera.org/comment/12324/","msgid":"<20200905222800.GO6319@pendragon.ideasonboard.com>","date":"2020-09-05T22:28:00","subject":"Re: [libcamera-devel] [PATCH v7 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 Fri, Sep 04, 2020 at 11:30:35AM +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> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\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 ce43af3..f78b73e 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -962,13 +962,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> @@ -1173,6 +1166,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 CAF22BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  5 Sep 2020 22:28:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5BFE5629B6;\n\tSun,  6 Sep 2020 00:28:26 +0200 (CEST)","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 D128F60599\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  6 Sep 2020 00:28:24 +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 5B140335;\n\tSun,  6 Sep 2020 00:28:24 +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=\"a/YAwYFF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1599344904;\n\tbh=g2u5+uNep0Aj4g+zHbB4s2k4BeXMv9W6mJx+l8iXBMg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=a/YAwYFFt+QTOqFw1SYzGtJkejbYNs/0esczryyBqvP+10nz4oW6tzpY9A+oTKjP/\n\t885pW6QIOO3AkS8HEBwfAGpwPVZKcalG7ngPrzDkTU8vlSmYp92sXVXUsVsVT/eLF7\n\tx4AVMgspNt9mayM782bsLV0vUioOtdeTdhytwn5s=","Date":"Sun, 6 Sep 2020 01:28:00 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<20200905222800.GO6319@pendragon.ideasonboard.com>","References":"<20200904103042.1593-1-david.plowman@raspberrypi.com>\n\t<20200904103042.1593-2-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200904103042.1593-2-david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v7 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>"}}]