From patchwork Fri Aug 28 14:41:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 9416 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 1BCBABF019 for ; Fri, 28 Aug 2020 14:41:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 003DF628F3; Fri, 28 Aug 2020 16:41:18 +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="EbbwXOgh"; dkim-atps=neutral Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5EC326037B for ; Fri, 28 Aug 2020 16:41:17 +0200 (CEST) Received: by mail-wm1-x32f.google.com with SMTP id t14so1131711wmi.3 for ; Fri, 28 Aug 2020 07:41:17 -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=uSc5m7UZr/nBlCCvcn3e9RFGm3q8lICTUphQChO2UKs=; b=EbbwXOgh7mvpg8TRZU9V00by8tY4q1ISdQRzHZYGJRQMGRqYT9Xx0PHp6oGFDf/Uwo 2mmhe3dCFJx4bNrka4K8PcgRvQzyhPjdiMKJhzNCgcEBPH9NO5Ai/vH2r8+LQzzIZP12 78juB4WiSl+aFWmqdMSHxZAJlulVyRiCE/UICWRMU8cDphRi358oGGb9bIA4sgS7FmNy IOgaVwpbvxqCcCkkeatV1aJGXuKzCDk3kgcTt/8yto1q4iRm1i27kFCKvzt2u8h4uxip z8Q8gaYyXr0/Nivt6JjptANxdioDsVeAhy+iWTN2qEgMZT2CoDys0EmdD7jBGNTyYqd9 r6YA== 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=uSc5m7UZr/nBlCCvcn3e9RFGm3q8lICTUphQChO2UKs=; b=Q7jn6j4cBiWI6GOhAg/dw0hTLq0IoFcPQ8k7hX0hbGxgyDkbTduD8o94ySzZ/fj7Mh K0EEVNayBDSLRENRgGgeOmfjwCvzgclTGrHaSvvHvPojn9nCMO8+L0Dsce/G2UdOlB7y Ww4aJw7k70HbhTr/qBUAQKzxW6Fv8rBQAZVsUc/qfvUiV8bpplwLqdYhW9V4Q2Axsm1E oXxhfPBHxoFiF5g7Xtd7CyatPOGQLURhaiiPr+xn38F4/o186RXw6DSyS7MDvi9/lcBO UZLD2IpX4FcAj+MueXwCeXMFuxuiU5iWojAwrZt+JJW7r5OqEIxFPPVqro9hxo6nF0zi ZWFw== X-Gm-Message-State: AOAM5319X5ISdwmDK9NhGlMEm3yQk+wFgen30Jg7ytwcmTyI6XgLIjyG TKtFKnxzNYkbqC89MnurBxpgH9Ey7fg56A== X-Google-Smtp-Source: ABdhPJzeQJSBppjDipYMzWLIILRrQiR258LfjjI+Mkn/boxG/yPFpLTyEos4UKsSWlrYsFnbhLTAwA== X-Received: by 2002:a1c:b143:: with SMTP id a64mr1871961wmf.43.1598625676740; Fri, 28 Aug 2020 07:41:16 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id s12sm2493724wmj.26.2020.08.28.07.41.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 07:41:16 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Fri, 28 Aug 2020 15:41:04 +0100 Message-Id: <20200828144110.17303-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200828144110.17303-1-david.plowman@raspberrypi.com> References: <20200828144110.17303-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 1/7] 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 --- 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 c1451e7..42c9caa 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -960,13 +960,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! @@ -1171,6 +1164,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) {