From patchwork Wed Sep 2 10:44:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 9444 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 10A5CBF019 for ; Wed, 2 Sep 2020 10:44:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CFF3062984; Wed, 2 Sep 2020 12:44: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="IgnkqGk1"; dkim-atps=neutral Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0FE10628EE for ; Wed, 2 Sep 2020 12:44:17 +0200 (CEST) Received: by mail-wr1-x42e.google.com with SMTP id m6so4727658wrn.0 for ; Wed, 02 Sep 2020 03:44: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=Wcr7IpixxCkOcntKY+WlarwGA5RJqYNWCxkC24oHDJM=; b=IgnkqGk1vGFy8GfppWbi3c5knHObxptJfNMjIP6Vqt1IFMMZDv9vPtL+my4sU4r8/D KNHXZzrIR6Qy89bQYZ6p5kRw0QACuIdqGVvYoKOxBTA6HS7Cz6g0y6dWBg/H0obRL51M Xt27lrI7o8P4xdTGYAEf4Hrur2ZTsnogkPU+RFw2DtEhX5BcXjkapeau42MGjQ2ucLgW uCa3goKi0qx2Rb0ihsA6lKvHbqMzI7fPrwzWxOwCT8vmG3NZDJAMGkyg9B4YQwM922d4 u8HghiSVZ8OlAuklvI8kH+C78om3v4h9OmXAcAKfu9kh/P2FdsC98vR+dwBMooMlvw9O dMxw== 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=Wcr7IpixxCkOcntKY+WlarwGA5RJqYNWCxkC24oHDJM=; b=BaKUV2Z6qvFUC2VkeUbvczs5UbNU60JZjBs0J6gc45XPojQwXUQ5QurluIb7ur2AcG nuUvAY4oj4kB6Y/fyXxtQjb1VwXZYYUYkJ5Aith3cwiZQ6kPXkGlZs6OLWeVyK0uQV7j mnCzDU1BNelA7brntG9x0HtdLe2ZP5rcTp0B4tE19lIcgAiQgdD/Sd/WkRDIxtJA4qCn VuW/r+cGzDhb30OR8nMd2UeZMwtSys0fCGVkGgyNDQgNUDslVLrSHM/Mdu7l4md5aUnc 3nr/0MlhsPZGxCUF2iN6Q6w/GdXNWNkqKowabvcVf9GlvpKbP19fdX9KL6ZbAVLl/2B/ z2Yw== X-Gm-Message-State: AOAM5338oCImUSkIgoGf0y4ho/vwhpPMCOl9l1Bon/UmK4SZj90/goE2 aWzCkX+HHnS4k9XpipKGGPnTzicMzIrWTA== X-Google-Smtp-Source: ABdhPJze67LxXGmKoYJwWq3dJQLLm7KqUP9un+DF84NgFyGWcPMsMc7lH2kb2n13Q/DyTj11dSMe2w== X-Received: by 2002:a5d:458e:: with SMTP id p14mr6631679wrq.61.1599043456463; Wed, 02 Sep 2020 03:44:16 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id m3sm5583062wmb.26.2020.09.02.03.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 03:44:16 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Wed, 2 Sep 2020 11:44:03 +0100 Message-Id: <20200902104410.7569-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200902104410.7569-1-david.plowman@raspberrypi.com> References: <20200902104410.7569-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 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 --- 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) {