From patchwork Fri Oct 2 09:08:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 9897 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 B3C74C3B5C for ; Fri, 2 Oct 2020 09:08:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4132960BCD; Fri, 2 Oct 2020 11:08:19 +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="MxM7/Avb"; dkim-atps=neutral Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E24126035D for ; Fri, 2 Oct 2020 11:08:17 +0200 (CEST) Received: by mail-wm1-x342.google.com with SMTP id x23so864212wmi.3 for ; Fri, 02 Oct 2020 02:08: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:mime-version :content-transfer-encoding; bh=ZKpwDg/hllWudocQHvHwGdfd8jWK4JO9+D0rJ+xTUZo=; b=MxM7/Avb8GCBXW43RkBRyWWV0/0Qrg6nE6nPm6nPSvl4G1q+9Ligpdu/s0xFcclhwI vMQyMui3dwswqloVgjeQDpQ3G82XUICfhrjgMzElWNAcs6d+DGhypnmHRqfdqUoVqsms ZGthZWZtwaql95idtK/vNXD5EWRgKK7l4sSCPQBVYM0WfqwFHfImZBNZoIlRh6+4bNHL outBh1BPPVa1VKstpaoAu/auz6JZiZK9SBaKYwmzErGLT4makZkkXu5Duuoo7TOzFcBD IOSv8WXRq5n3hURNhpMVPuq4TO4epAe1hgtBeHIPFA/xdSkxrkxOMc6+VIEMGvJXbIvt 0f9w== 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:mime-version :content-transfer-encoding; bh=ZKpwDg/hllWudocQHvHwGdfd8jWK4JO9+D0rJ+xTUZo=; b=V6UDbrrfIG7Jj3SG2CRVgBJd+wVHuNXe0+zOBqrVk5ag/SbSxe+jtXGC2FBZynInxd XXlFiYk1KXYaiOpVaT+GttwsWJvvmZrNzIlg6jHGYGNgbu6VNxDUtVphjGIXgVa/l6+k iRHEelh9eBeObYKbbk4siKNNvWPRshsAXLLntj9qAscPFRNhohZhL4Kk64MJDQ0+nJ9E qM+bNDxZ5v/RllqurClvPEVda6pbhXXzBn2WilW5fviF2URGoSx15vqn/h+hpamxQ6Jw vCcrQIiRnHrISot/rwsc4yeBrTQayVaNUGeHP4Rvd0qAYVaS9LP8BlGb7dAKl0KKwF3G 4ikg== X-Gm-Message-State: AOAM531vNDPXqn8l2j5P7/vfJvnCcy/L5Yvk1lhRDFQ4NLNSvWClXX4m YHaWHv+EBjDvZZOX4jjicbEb2du6nOouCw== X-Google-Smtp-Source: ABdhPJyWF16GNnVYzbGk8BaP9//ybuq+haCdzbopCuiFt2kBH5lAhpa6TScciFKHzMkg1j4HN3MksA== X-Received: by 2002:a7b:c750:: with SMTP id w16mr1768809wmk.16.1601629697115; Fri, 02 Oct 2020 02:08:17 -0700 (PDT) Received: from naushir-VirtualBox.pitowers.org ([2a00:1098:3142:14:a00:27ff:fe4d:f6a2]) by smtp.gmail.com with ESMTPSA id e18sm1017160wrx.50.2020.10.02.02.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 02:08:16 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Oct 2020 10:08:07 +0100 Message-Id: <20201002090807.108859-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] 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_STAGGERED_WRITE return result. This should be applied unconditionally. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Kieran Bingham --- .../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; }