From patchwork Fri Oct 2 09:33:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 9899 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 4A404C3B5B for ; Fri, 2 Oct 2020 09:33:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8DF5C625AF; Fri, 2 Oct 2020 11:33:15 +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="nHcoiBMS"; dkim-atps=neutral Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5BFDC60394 for ; Fri, 2 Oct 2020 11:33:14 +0200 (CEST) Received: by mail-wm1-x344.google.com with SMTP id t17so995140wmi.4 for ; Fri, 02 Oct 2020 02:33:14 -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=tKR6QKoHMdc2FLcGM9k70wkBXqJDIsU1JD4u0rBxRzE=; b=nHcoiBMSwZ04PE/h+a1rhRh8GBwe84H0qtUTvy7N9CeeVaS5F+PGt9aYv/DVWnYDG5 SK0lejTXnle8RbBLL2AImPUvyGJJ7znhIPHHhPkTMVQige1dHklm0uW0u+WqpE7eckNN 9iS3WErInRuFBRWaFTZClXW1hX0pGqZGvUiZsHjFmbowedXIH32AvW3T4xeFzl7N8FE1 ONrIJuDJMLjbgniExSE6Bye63slY5BJDHUrF0rcvkZS6GQm959b4FHm+qAsBz/GxxD9S Z9Kxqwmiaup5galwbyROpCTaLq2gsozJFYbLBeuAK55lVR3gBcKG51kYP1S8zkVKCC7C kHgg== 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=tKR6QKoHMdc2FLcGM9k70wkBXqJDIsU1JD4u0rBxRzE=; b=NFEftH36Csjauxj3lwHbbxKC5iq3/r7G8dJDIiYrjMb7XOKkbE51tTr2RZwf5nS5Ky h9+gknoGYK8CzK/6Nk/gLBzUkA2uXnp5RvsYnWTz9PnY4rLwZoEpdiFa4oI4ME0tsQ29 l+hAQB7nMOciAVOJzFn5vGa+CIkLzyi5+vc5E8LCKJR02ixLPEg9782z5Q+WRAtkr6N5 AaZ6sHjwRyONrpXNgi0+x1VjcOqBBMxt64X5qs9tyA+k9e7DfyRr9nX1j1mzmrlZqi8k +3UQiqn4dFfmY4nyfkIKdDuIAOCtYpw25Boe7BT4jfMcTMQ5wKkKuG3HOtvwAykwu0e8 GA0A== X-Gm-Message-State: AOAM5321vI6fEPyQtlwuzgjACh5t4OZVG0vDAs8mofKQXjLfhU6tqWOx m10okI3jonFgPA6vtKWVIUU6GqQCgyclMw== X-Google-Smtp-Source: ABdhPJwcs3s+PT9VB3ZOs4HU98YSQ5foqEloea1VlrO3CN4z4AuDVaFS2rb+D/ZQWnF1FmrbHVfxLA== X-Received: by 2002:a1c:2cc2:: with SMTP id s185mr1876269wms.77.1601631193816; Fri, 02 Oct 2020 02:33:13 -0700 (PDT) Received: from naushir-VirtualBox.pitowers.org ([2a00:1098:3142:14:a00:27ff:fe4d:f6a2]) by smtp.gmail.com with ESMTPSA id t203sm1101145wmg.43.2020.10.02.02.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 02:33:13 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Oct 2020 10:33:05 +0100 Message-Id: <20201002093309.109180-2-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201002093309.109180-1-naush@raspberrypi.com> References: <20201002093309.109180-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/5] pipeline: raspberrypi: Sensor flips should be applied unconditionally 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" The code in pipeline_handler::start() that applies the flips were in a block that was conditional on the RPi::IPA_CONFIG_SENSOR return result. This should be applied unconditionally. Signed-off-by: Naushir Patuck --- .../pipeline/raspberrypi/raspberrypi.cpp | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index d4d04c0d..1052bdce 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -1172,19 +1172,6 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config) { V4L2_CID_EXPOSURE, result.data[resultIdx++] } }); sensorMetadata_ = result.data[resultIdx++]; } - - /* - * Configure the H/V flip controls based on the combination of - * the sensor and user transform. - */ - if (supportsFlips_) { - ControlList ctrls(unicam_[Unicam::Image].dev()->controls()); - ctrls.set(V4L2_CID_HFLIP, - static_cast(!!(rpiConfig->combinedTransform_ & Transform::HFlip))); - ctrls.set(V4L2_CID_VFLIP, - static_cast(!!(rpiConfig->combinedTransform_ & Transform::VFlip))); - unicam_[Unicam::Image].dev()->setControls(&ctrls); - } } if (result.operation & RPi::IPA_CONFIG_SENSOR) { @@ -1198,6 +1185,19 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config) dropFrameCount_ = result.data[resultIdx++]; } + /* + * Configure the H/V flip controls based on the combination of + * the sensor and user transform. + */ + if (supportsFlips_) { + ControlList ctrls(unicam_[Unicam::Image].dev()->controls()); + ctrls.set(V4L2_CID_HFLIP, + static_cast(!!(rpiConfig->combinedTransform_ & Transform::HFlip))); + ctrls.set(V4L2_CID_VFLIP, + static_cast(!!(rpiConfig->combinedTransform_ & Transform::VFlip))); + unicam_[Unicam::Image].dev()->setControls(&ctrls); + } + return 0; }