From patchwork Mon Sep 7 07:15:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 9502 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 AA158BDB1C for ; Mon, 7 Sep 2020 07:16:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B449662B9D; Mon, 7 Sep 2020 09:16:10 +0200 (CEST) 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="e3iOECqe"; dkim-atps=neutral Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 463BE60371 for ; Mon, 7 Sep 2020 09:16:09 +0200 (CEST) Received: by mail-wm1-x334.google.com with SMTP id a65so13282438wme.5 for ; Mon, 07 Sep 2020 00:16:09 -0700 (PDT) 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=GXI6YekHnWkMPTQZaJl+U5wRCpF/l72zpWIww/sUItY=; b=e3iOECqe3OOllFavJf0LnJZ3xDoXg15PvrID79+2O7GLlcv7n4gLAEAlFYrIj0Mm+1 eGT/0lIQGMWxw3a05fb/zB6eES8g2DztfsfVKhgkjqkHM0RxCPDoXCLZfxfRC77rGNNS ZK8kbQjFJAOWcX9GapaiQs1G/b4K1wNwWGapaP94AsmYx2JPRib7X7lekNBU4oay4izh nFztEdXrXflSOR7pSNtPX17mClD4+NQL7CkDtBcfWNgBB+9vyeEcX/HCtzgqRZxYbTqX j8Id4Zp9bXokLMOU7TjD/98zOJ4Xb9ChYKIt30J68cqrZKPr7b0cThpZjjAnGt8ZCLh2 T4MQ== 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=GXI6YekHnWkMPTQZaJl+U5wRCpF/l72zpWIww/sUItY=; b=UAXMh+qDk2coOQjmMFQPwYcpRD8ysEYLDubqyJQsqHQIK6B5MqNUlbA/Fj0oaAKfj5 2TpEyLnun4UBFixT5MVhtKAbuhngeFhXY+0UWngIpVTXqiwxA/48yvWMQ8LC1dhSk9qn oN8t3fjCQofDhiaLoZpdWmpom3HZSWsQSxcaVX79FM9tmX3D8ZnEMTiDGpPqJdzbn6jq gfUTvUEfvE1YYjefhM9Xc9oy30+uMAWzSdS3j8PFahonnc2xotzrt5+aRXlNzO9UDQgw mt330w7w3Nmftn1SMwaygLdbnaU2WMbYac4AfHfBuSzTU7LjAosYkMMwcSf7az4Qerp/ l4mA== X-Gm-Message-State: AOAM53102dngvve/o1seDcvLCUqY7xVKGvsI5p8/GhW0zDUQhdQ+EraH XM/NlM+BKS/T1Sg6KFTYeGQY/ocMz479/g== X-Google-Smtp-Source: ABdhPJwuvhd9/W9AdILFLedgg0lYEQ5qXtdATlO1CWpd0lAFUV1LRX/hBAxwLf7DfPdjZgHzPz8pwg== X-Received: by 2002:a7b:c3da:: with SMTP id t26mr18402240wmj.23.1599462968714; Mon, 07 Sep 2020 00:16:08 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id b2sm25543636wmh.47.2020.09.07.00.16.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Sep 2020 00:16:08 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Mon, 7 Sep 2020 08:15:56 +0100 Message-Id: <20200907071604.8355-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200907071604.8355-1-david.plowman@raspberrypi.com> References: <20200907071604.8355-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v8 1/8] libcamera: pipeline: raspberrypi: Revert "Set sensor default orientation before configure()" 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" This reverts commit 1e8c91b65695449c5246d17ba7dc439c8058b781. Now that we shall be implementing application-defined 2D transforms it's no longer possible to set the sensor orientation so early on. We have to wait until we have the CameraConfiguration object as that's where the application puts its choice of transform. Signed-off-by: David Plowman Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index ce43af3..f78b73e 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -962,13 +962,6 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator) /* Initialize the camera properties. */ data->properties_ = data->sensor_->properties(); - /* Configure the H/V flip controls based on the sensor rotation. */ - ControlList ctrls(data->unicam_[Unicam::Image].dev()->controls()); - int32_t rotation = data->properties_.get(properties::Rotation); - ctrls.set(V4L2_CID_HFLIP, static_cast(!!rotation)); - ctrls.set(V4L2_CID_VFLIP, static_cast(!!rotation)); - data->unicam_[Unicam::Image].dev()->setControls(&ctrls); - /* * List the available output streams. * Currently cannot do Unicam streams! @@ -1173,6 +1166,13 @@ int RPiCameraData::configureIPA() { V4L2_CID_EXPOSURE, result.data[1] } }); sensorMetadata_ = result.data[2]; } + + /* Configure the H/V flip controls based on the sensor rotation. */ + ControlList ctrls(unicam_[Unicam::Image].dev()->controls()); + int32_t rotation = sensor_->properties().get(properties::Rotation); + ctrls.set(V4L2_CID_HFLIP, static_cast(!!rotation)); + ctrls.set(V4L2_CID_VFLIP, static_cast(!!rotation)); + unicam_[Unicam::Image].dev()->setControls(&ctrls); } if (result.operation & RPI_IPA_CONFIG_SENSOR) {