From patchwork Sat Aug 29 11:54:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 9427 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 24264BF019 for ; Sat, 29 Aug 2020 11:54:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 061AB6037D; Sat, 29 Aug 2020 13:54:37 +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="SY1SW3ml"; dkim-atps=neutral Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 638356037D for ; Sat, 29 Aug 2020 13:54:35 +0200 (CEST) Received: by mail-wm1-x332.google.com with SMTP id e17so1318228wme.0 for ; Sat, 29 Aug 2020 04:54:35 -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=SY1SW3mlx8xpe74+qtKRpZww4lc6z71d4JkA3ZJaPfqfMObR/8r8trmGeVTBorierZ 6YvPbVCheOhDmqYaI0iMd3rHTmbH5uoI5qrBk+hKJPfArcocGH9Agnu3kZzkVXqX5Ecm kzwYcU3WhqpRl+AJHXWCWlFSEbWxTvmYumxrycTK+87BBdipifTxJaNhEvaSBqPrRhSb kMFCss97pMgz3W2qmd9e9bRjFe9JJtBGFJwFpDJnAcRwSvWmyK2WzIFNc17M6ska2pn7 1neqhdqo2+kNp065Q3EgrBuMc65lxp7fBRi5NPrwKKttiyq6XQwyZGDA9ft/aFNGUa6H 4ihA== 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=DPgd62dtNIR5/nvBwWOzE5q57UySjq3LtD32gS2KXzsjcfYPQntZDGaMDqzoa73IvH W4km7CGd+suSbIZlkUqz+nU/lFy5wNgCDpvTT36kf5Y+bCTqz1H7LnSF/Tv9zWye+VDH bzEyQg/Tfxychxe9njXsNkLrs9ZbV4gPUgG4B+MSWYD852J8DYXJL5gMScAwJzceDkZ1 i7iPCCcmeo95dv4rpeunyZhbPHUGlNyJK37eyc5RuNvat2wlt2r5cfLh6G/dXeC/ApNI UiuhJFYPn7RS813mbBUt9DJ8BPaR0iHgsYflN5xZPUhqZMaKcqN30taNAowl+jnZJ+0T 1WiQ== X-Gm-Message-State: AOAM532Q4wCkwH5rCxJ344mgAbnJduEppLPONUPjKGQ2WfXguumdEUXK oyx9ArSWf6xWOpS+K+JtYmmW42RBVaWPRQ== X-Google-Smtp-Source: ABdhPJxJS/4y6RW3s5dn9aI8/QHjmbqI52qIMXjcrgI5fpO++9QtwdKbS4drU789+bNJP9AZrkSObA== X-Received: by 2002:a1c:c20a:: with SMTP id s10mr2945977wmf.55.1598702074887; Sat, 29 Aug 2020 04:54:34 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id v16sm3071523wmj.14.2020.08.29.04.54.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2020 04:54:34 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Sat, 29 Aug 2020 12:54:22 +0100 Message-Id: <20200829115429.30010-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200829115429.30010-1-david.plowman@raspberrypi.com> References: <20200829115429.30010-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 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: 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 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) {