From patchwork Tue Nov 18 13:27:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 25079 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 5E056BD80A for ; Tue, 18 Nov 2025 13:27:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0F28060A9D; Tue, 18 Nov 2025 14:27:28 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="gMaMCldX"; dkim-atps=neutral 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 B9E62606D5 for ; Tue, 18 Nov 2025 14:27:25 +0100 (CET) Received: from charm.hippo-penny.ts.net (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6D2BD1E33; Tue, 18 Nov 2025 14:25:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1763472321; bh=QbXBG/9PlFjgkCPKUXIKK6MON1nBUUW0dLNrl2T2uug=; h=From:To:Cc:Subject:Date:From; b=gMaMCldXGylVvafaL/ze401eYuiBEH9ktYDiPoSXWENCEFanoRQmq2XMxckx7hapF Wv4H0Lu4gom7+DJ7aPsJcUWz4nkYTW/dlsfLVN0PA6pMq77C7Hp5/+m4Qk+01N5hy8 fTpdDrAkzXiS5mTZYvil1fPC9LaezITEoZpKBGLc= From: Kieran Bingham To: libcamera devel Cc: Kieran Bingham , Laurent Pinchart , =?utf-8?b?QmFybmFiw6FzIFDFkWN6?= =?utf-8?q?e?= Subject: [PATCH v2] pipeline: simple: Reduce warning of unknown pixel formats Date: Tue, 18 Nov 2025 13:27:19 +0000 Message-ID: <20251118132720.18468-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.51.1 MIME-Version: 1.0 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 Simple Pipeline is designed to support a wide variety of pipeline configurations and attached devices and will enumerate the pixel formats of the connected sensors to map these to libcamera formats where available. In fixed pipelines, where the pixel format is not mapped correctly it is a desired behaviour to express this warning so that the pixelformat can be added, while in the simple-pipeline case we do not expect warnings for every discovered pixel format which is not supported by libcamera. This currently manifests itself as very highly verbose warnings about unsupported pixel formats are not desired when there are working formats that have already been enumerated. Fortunately in commit 434edb7b4480 ("libcamera: formats: Fix warning for unknown V4L2 pixfmt") we have a mechanism to disable the warning for occasions where we wish to ignore unsupported formats. Use this feature to disable the warning in the core V4L2PixelFormat and instead report only a debug level print from the simple pipeline handler. On devices such as the Pinephone, this removes overly verbose warnings for tiled YUV formats: [0:06:39.291083146] [1922] ERROR SimplePipeline simple.cpp:1600 No valid pipeline for sensor 'gc2145 0-003c', skipping [0:06:39.302229740] [1922] WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12 [0:06:39.302779117] [1922] WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12 [0:06:39.303417578] [1922] WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12 [0:06:39.303928998] [1922] WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12 [0:06:39.304615751] [1922] WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12 Closes: https://gitlab.freedesktop.org/camera/libcamera/-/issues/291 Suggested-by: Laurent Pinchart Reviewed-by: Barnabás Pőcze Signed-off-by: Kieran Bingham --- v2: - Maintain the ability to discover the unsupported formats when enabling debug prints. src/libcamera/pipeline/simple/simple.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index 91715b7f8afd..118b4186c8bf 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -710,9 +710,14 @@ void SimpleCameraData::tryPipeline(unsigned int code, const Size &size) << " ]"; for (const auto &videoFormat : videoFormats) { - PixelFormat pixelFormat = videoFormat.first.toPixelFormat(); - if (!pixelFormat) + PixelFormat pixelFormat = videoFormat.first.toPixelFormat(false); + if (!pixelFormat) { + LOG(SimplePipeline, Debug) + << "Unsupported V4L2 pixel format " + << videoFormat.first.toString(); + continue; + } Configuration config; config.code = code;