From patchwork Mon Feb 6 17:03:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 18258 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 C287CC324D for ; Mon, 6 Feb 2023 17:04:04 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 77D02625FF; Mon, 6 Feb 2023 18:04:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1675703044; bh=mhAXj3ZJoUvv57m/BjNK7q+eRy5lZd9dn4NUX+9gsCw=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=NydW+nF1nPmAwTIpqm8I1Zw5d8D8Rw99/E0cVgTK2cJ6iEMl1LjabzQ4+4vZ3ss7X i9RFwcJBIIE+ZOu/gyqyL9BvtAgzM27jXCD4SBQGyqH+G4h7tnpQlJkeF5wFmcFXQ5 c0h81R0PseCo86N8DEu3iZJ1QLtCYlvDnQxLpR9VLgIyUJ2hilIKIW+XcjJv7E1hD7 9NWotVZM9/9jHY6VOkq7530bknos9Moy+Hrcgu/EGjI0nuQGW9k/HmgLtMCS6Z2WJu ISB2GEed/FIIMJYzerAa88swAUtEkXub3R66Td+FGZ1kQSbGnjuxLdEwtgAFW7b3cV kRUNIZXaoITig== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6352C61EF6 for ; Mon, 6 Feb 2023 18:04:03 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="FUrBXjSJ"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (unknown [109.136.43.56]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 117144DA for ; Mon, 6 Feb 2023 18:04:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1675703043; bh=mhAXj3ZJoUvv57m/BjNK7q+eRy5lZd9dn4NUX+9gsCw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FUrBXjSJLWT6NC2wDNP7OyxXwP0VfgvkhxEFdy5Hk2BnNldFZLSaMRdJDnXVXUbCD NYwp9ab+PIexVPJbncLMwQdyXeOZhkD8yhb2Bkp0f+dQ6J9Ql02qFgvG2Vx2MVNuGV W+74iO3RFZu04YP8zeQUbtDUlUCmxtEqIUw6BRx4= To: libcamera-devel@lists.libcamera.org Date: Mon, 6 Feb 2023 19:03:56 +0200 Message-Id: <20230206170356.20340-5-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230206170356.20340-1-laurent.pinchart@ideasonboard.com> References: <20230206170356.20340-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 4/4] pipeline: raspberrypi: Drop unused code 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: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Commit 1a614866a29c ("libcamera: camera_sensor: Validate Transform") has removed usage of the RPiCameraData::supportsFlips_ but hasn't removed the field itself, nor its initialization. Drop those as they're unused. Fixes: 1a614866a29c ("libcamera: camera_sensor: Validate Transform") Signed-off-by: Laurent Pinchart Reviewed-by: Naushir Patuck Reviewed-by: Umang Jain --- .../pipeline/raspberrypi/raspberrypi.cpp | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index d752911ddfff..77e860ab0e72 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -187,8 +187,8 @@ class RPiCameraData : public Camera::Private public: RPiCameraData(PipelineHandler *pipe) : Camera::Private(pipe), state_(State::Stopped), - supportsFlips_(false), flipsAlterBayerOrder_(false), - dropFrameCount_(0), buffersAllocated_(false), ispOutputCount_(0) + flipsAlterBayerOrder_(false), dropFrameCount_(0), + buffersAllocated_(false), ispOutputCount_(0) { } @@ -275,11 +275,9 @@ public: std::deque requestQueue_; /* - * Manage horizontal and vertical flips supported (or not) by the - * sensor. Also store the "native" Bayer order (that is, with no - * transforms applied). + * Store the "native" Bayer order (that is, with no transforms + * applied). */ - bool supportsFlips_; bool flipsAlterBayerOrder_; BayerFormat::Order nativeBayerOrder_; @@ -1424,12 +1422,10 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me data->properties_.set(properties::ScalerCropMaximum, Rectangle{}); /* - * We cache three things about the sensor in relation to transforms - * (meaning horizontal and vertical flips). - * - * If flips are supported verify if they affect the Bayer ordering - * and what the "native" Bayer order is, when no transforms are - * applied. + * We cache two things about the sensor in relation to transforms + * (meaning horizontal and vertical flips): if they affect the Bayer + * ordering, and what the "native" Bayer order is, when no transforms + * are applied. * * We note that the sensor's cached list of supported formats is * already in the "native" order, with any flips having been undone. @@ -1438,7 +1434,6 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me const struct v4l2_query_ext_ctrl *hflipCtrl = sensor->controlInfo(V4L2_CID_HFLIP); if (hflipCtrl) { /* We assume it will support vflips too... */ - data->supportsFlips_ = true; data->flipsAlterBayerOrder_ = hflipCtrl->flags & V4L2_CTRL_FLAG_MODIFY_LAYOUT; }