From patchwork Mon Feb 6 17:03:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 18255 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 200B8C324D for ; Mon, 6 Feb 2023 17:04:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B74E5625F8; Mon, 6 Feb 2023 18:04:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1675703041; bh=3zkbHBkMwNqbmBaUC3eizRzKB3rzKck0Um3MDuTgJpA=; 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=jVpExFO5w7vtiBXD51xVKQve8q5wBfVyaT016pFeCgV/GNreVfIebahgspe6q+CQN hTZ0y3wW+Cva1142ubCkqHxCiZvTSTcvjyxZPQydy8h2byR96O03nOHDCd3S+khE6k 4sZ3gzuqOAXR0aQUc6xdASVt1Bn9Bh5jo/FM+AI0ii8oLGJWvAxYMM8axUOqYGBBHv OKsiUH7ykZGyeIJ5CwZoW1YCLc8v/shtsHwgFT5XEcxn8kB6/d/+dc5QvDt6IGdM6L eAI+1efyEooMexS/GXvl772/F/FwNjbiS14+2zVEI+BN73COH5oyaMusKXOVEgEjx6 7Ys70F6z85n0A== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B828E61EF4 for ; Mon, 6 Feb 2023 18:03:59 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="R36MTtk+"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (unknown [109.136.43.56]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 60B674DA for ; Mon, 6 Feb 2023 18:03:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1675703039; bh=3zkbHBkMwNqbmBaUC3eizRzKB3rzKck0Um3MDuTgJpA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=R36MTtk+K4JIdJDT3WYIqiAgf31V8nOJCqxu+feqbNH0tmzq5uEgVas15NHmCNoSl NYrdhKemzTID3jthkBWibMgPFf+MYPItCiE9gsVGYae7LlvOqx3xddItHruIjkv1CH 8E+8SS7snYMexwERwzwuzkPIe1Ys9kU/io1GQp8Y= To: libcamera-devel@lists.libcamera.org Date: Mon, 6 Feb 2023 19:03:53 +0200 Message-Id: <20230206170356.20340-2-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 1/4] libcamera: camera_sensor: Demote flip support message to Debug 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" The CameraSensor::validateSensorDriver() function prints a Warning message when the camera sensor doesn't support flips. We don't mandate flip support and can run without it without any problem, so a warning is too harsh. Demote it to a Debug message. Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain --- src/libcamera/camera_sensor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index b772337eb44a..11117502d817 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -261,7 +261,7 @@ int CameraSensor::validateSensorDriver() supportFlips_ = true; if (!supportFlips_) - LOG(CameraSensor, Warning) + LOG(CameraSensor, Debug) << "Camera sensor does not support horizontal/vertical flip"; /* From patchwork Mon Feb 6 17:03:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 18256 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 223DBBEFBE for ; Mon, 6 Feb 2023 17:04:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5736D625F1; Mon, 6 Feb 2023 18:04:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1675703042; bh=OgQo0Z0iK/8tiIURZRhO8S9jZnoomSz+CA0NP8uYdxo=; 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=i/40BZyJYVN+EMWr5VYgXG3e6wQFAyj3o7myhMElCOKsLjCGVoEsEN+HOXxnJV4bD PqYtkUhr5tRMK7ucU8IhAFgDUoxUOJyRr3Hm20jaJ4HdQRKE90GY5g8PQTkNGPNOOz VNm3NrNAUsKuXYjCah3NAkKkgo9sMTiYXpsogpGP7Cw1ejRL3zPeOFSYDEmjt8nwun /KvHoh7uxCC180jN71fjRz7ElyTHy73OM6jZOI/55HWnk7O6qyabmpO8nNzCaeFP5V h2KzVvzLlsxd9p0gmObNisSZ2t8qpFrvz871Z8VE+385/0rOH5o26Oi7vi09Mkpzck JmCMHFWCKhU1w== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EF019625F1 for ; Mon, 6 Feb 2023 18:04:00 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="wOZTTPcQ"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (unknown [109.136.43.56]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 94AE14DA for ; Mon, 6 Feb 2023 18:04:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1675703040; bh=OgQo0Z0iK/8tiIURZRhO8S9jZnoomSz+CA0NP8uYdxo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wOZTTPcQ2ssr4cnoKwRDCXQsU6Luj43tuZs7DozX9HA30vd/xxvVJkKAmZ4Udhz4T nxHIexiy/QJYhV2HiWuKNhyze5BJdIs//U8jY56hXhaqU1VKqp6Ey0LvqnyTNJmDWK 3FOBgXHpE6ZxhR0EEeSFlus+6e1QQLJcSRhaeolM= To: libcamera-devel@lists.libcamera.org Date: Mon, 6 Feb 2023 19:03:54 +0200 Message-Id: <20230206170356.20340-3-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 2/4] libcamera: camera_sensor: Fix typo in comment 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" Fix a typo introduced in a comment when refactoring transformation handling in the CameraSensor class. Fixes: 1a614866a29c ("libcamera: camera_sensor: Validate Transform") Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain --- src/libcamera/camera_sensor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index 11117502d817..274ed419ddfd 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -1023,8 +1023,8 @@ Transform CameraSensor::validateTransform(Transform *transform) const /* * We combine the platform and user transform, but must "adjust away" - * any combined result that includes a transform, as we can't do those. - * In this case, flipping only the transpose bit is helpful to + * any combined result that includes a transposition, as we can't do + * those. In this case, flipping only the transpose bit is helpful to * applications - they either get the transform they requested, or have * to do a simple transpose themselves (they don't have to worry about * the other possible cases). From patchwork Mon Feb 6 17:03:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 18257 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 41ACDC329C 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 0079B625FD; Mon, 6 Feb 2023 18:04:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1675703044; bh=RiAibVoMVJWWjNmCK3UmaB/yHa779zjqdmV1+13l7TM=; 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=dvq0goepW2cTw4Cn+OrZ9NsBouqRLcLv67nZlwcBayYLeLcIpN8HupJge30CtjA3w sTZKjKiVZ5KqYrOZJRhn0Ow4Pa0xz1pORKBruQBbymdbWx/HuxRW3SBgUyvkGotR8I aEuK0QJktvaaIKBpLima5MXGP08NpNbny4ugtHTTRhg6o8LErwAtYP6NEWQ/UEfumc z9tM6z/ePS883OosvO+UpPXqgTqi7A3rDspNJ7npEliQfWTvblOTKry6/qcW0H1ijt U67COZP/aGWdF1bY5Ple7sDpAuaLbToNOnsniy66bTgX+iEPmnxhD51XBtpInZXXjU SQ+Eisu8RESMQ== 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 6960E625FF for ; Mon, 6 Feb 2023 18:04:02 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Vr2wJo1U"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (unknown [109.136.43.56]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D1AEF4DA for ; Mon, 6 Feb 2023 18:04:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1675703042; bh=RiAibVoMVJWWjNmCK3UmaB/yHa779zjqdmV1+13l7TM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Vr2wJo1UiDWLGO85NB6O0nqk142zZYBxz3gS9xIVgfY4yCDEklXwffvK2ddtGDiqR GuoX02DYuDnGpgclobnod4EfdWIydAlUIDhL+CB+bn5wwvyVZOr6ozRi2r2KrQFjFM GB4CySyMRICTvCcc53MFwgRH/ey2aKZzYNI/aoIk= To: libcamera-devel@lists.libcamera.org Date: Mon, 6 Feb 2023 19:03:55 +0200 Message-Id: <20230206170356.20340-4-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 3/4] pipeline: ipu3: 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 IPU3CameraData::rotationTransform_ 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: Umang Jain --- src/libcamera/pipeline/ipu3/ipu3.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 3a569c7e0031..355cb0cb76b8 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -73,7 +73,6 @@ public: Stream rawStream_; Rectangle cropRegion_; - Transform rotationTransform_; std::unique_ptr delayedCtrls_; IPU3Frames frameInfos_; @@ -1101,13 +1100,6 @@ int PipelineHandlerIPU3::registerCameras() << cio2->sensor()->id() << ". Assume rotation 0"; - int32_t rotationValue = rotation.value_or(0); - bool success; - data->rotationTransform_ = transformFromRotation(rotationValue, &success); - if (!success) - LOG(IPU3, Warning) << "Invalid rotation of " << rotationValue - << " degrees: ignoring"; - /** * \todo Dynamically assign ImgU and output devices to each * stream and camera; as of now, limit support to two cameras 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; }