From patchwork Fri Sep 4 10:30:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 9491 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 6077EBE174 for ; Fri, 4 Sep 2020 10:30:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6B09A62B29; Fri, 4 Sep 2020 12:30:49 +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="YtpSf56c"; dkim-atps=neutral Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0E95A60371 for ; Fri, 4 Sep 2020 12:30:48 +0200 (CEST) Received: by mail-wr1-x432.google.com with SMTP id c18so6191174wrm.9 for ; Fri, 04 Sep 2020 03:30:48 -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=WGbtWdgkXnhzgLWEMiyouzRS4O02UfaVPvUia46yucQ=; b=YtpSf56c0u5jArBM3jlRVl0hl8kyzr0oZRuNYZOcoIUyrSUkxypt6pyZO6PQYLRN3y W4fBjCJ7KetLXRuG+6Pdt8xDjoVKSNDeVBmDAmhaEyfnOeYy+1z7gEK16uAemi+f0ZUf T5ufuXK7TF8+Jf+CGjjhZ+ySX6b7XtQf2H7LEkOuzwORGpe9xiJOJRqkEf4pU4orw3+x cMqk8dwv7SkvaVgNtwYGQOifIiVbJOCUgjoFAQ3K5y7rKdxrd1sC+94QGxFYiKrSvCyQ 6mpGE35IZcTGryKY0ktsNIRucWiWyaD93vVRom+JAuB0dRBU9lGoMHccJSFruwi2Uxi3 vRsw== 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=WGbtWdgkXnhzgLWEMiyouzRS4O02UfaVPvUia46yucQ=; b=UKqGwvPcURIqiuN7FQ0YKKBYRUNUJ68yDD5tq6f12L+IrV1uFNEN9JLBnGvcXpFqqS zaYkLRyfesZGSQH3Tl/v8bZVFmvRZUXiHA3ns2b0wdm8ELHU3FY14dCxntyG1t2552Rl bGlKKGnXHgKAWAp9Ix60qioPP6yoIrmO/CoaApgkVWwkfqkBKeataEj70eLxISbYNE/K P76iZbZw3mew0/j8gD2Gm44uTYUqq2aWhBr+gS5PoQcKeorkw18AqKP364CKzpDmZl13 8CC9R1BJLr/nIOhbamn/nNicxpW0IVMZOp4y9Ujk75Tu/pkYCOCRdQnrOlMfhS9bHo+o K6nQ== X-Gm-Message-State: AOAM530uQvXQPaD1qfWR4nuTE1kZBDN6+ru/jOo7IuAp2MwGl1YxVBhc MiEVA9U1i5Lmw8VSgTDwWIQrs28NuORa9w== X-Google-Smtp-Source: ABdhPJznHi5+h3Fzjidm0jyRZ1owLdCXs9KSvhHCSHIygxWpsuPr3TZA3jDM/yboKqHhZPKlOxG7Uw== X-Received: by 2002:adf:9d44:: with SMTP id o4mr6978623wre.361.1599215447393; Fri, 04 Sep 2020 03:30:47 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id q4sm10294542wru.65.2020.09.04.03.30.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 03:30:46 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Fri, 4 Sep 2020 11:30:35 +0100 Message-Id: <20200904103042.1593-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200904103042.1593-1-david.plowman@raspberrypi.com> References: <20200904103042.1593-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v7 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) {