[{"id":36893,"web_url":"https://patchwork.libcamera.org/comment/36893/","msgid":"<20251119041839.GG10711@pendragon.ideasonboard.com>","date":"2025-11-19T04:18:39","subject":"Re: [PATCH v2] pipeline: simple: Reduce warning of unknown pixel\n\tformats","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Nov 18, 2025 at 01:27:19PM +0000, Kieran Bingham wrote:\n> The Simple Pipeline is designed to support a wide variety of pipeline\n> configurations and attached devices and will enumerate the pixel formats\n> of the connected sensors to map these to libcamera formats where\n> available.\n> \n> In fixed pipelines, where the pixel format is not mapped correctly it is\n> a desired behaviour to express this warning so that the pixelformat can\n> be added, while in the simple-pipeline case we do not expect warnings\n> for every discovered pixel format which is not supported by libcamera.\n> \n> This currently manifests itself as very highly verbose warnings about\n> unsupported pixel formats are not desired when there are working formats\n> that have already been enumerated.\n> \n> Fortunately in commit 434edb7b4480 (\"libcamera: formats: Fix warning for\n> unknown V4L2 pixfmt\") we have a mechanism to disable the warning for\n> occasions where we wish to ignore unsupported formats.\n> \n> Use this feature to disable the warning in the core V4L2PixelFormat and\n> instead report only a debug level print from the simple pipeline\n> handler.\n> \n> On devices such as the Pinephone, this removes overly verbose warnings\n> for tiled YUV formats:\n> \n> [0:06:39.291083146] [1922] ERROR SimplePipeline simple.cpp:1600 No valid pipeline for sensor 'gc2145 0-003c', skipping\n> [0:06:39.302229740] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> [0:06:39.302779117] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> [0:06:39.303417578] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> [0:06:39.303928998] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> [0:06:39.304615751] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> \n> Closes: https://gitlab.freedesktop.org/camera/libcamera/-/issues/291\n> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> ---\n> v2:\n>  - Maintain the ability to discover the unsupported formats when\n>    enabling debug prints.\n> \n>  src/libcamera/pipeline/simple/simple.cpp | 9 +++++++--\n>  1 file changed, 7 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index 91715b7f8afd..118b4186c8bf 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -710,9 +710,14 @@ void SimpleCameraData::tryPipeline(unsigned int code, const Size &size)\n>  \t\t<< \" ]\";\n>  \n>  \tfor (const auto &videoFormat : videoFormats) {\n> -\t\tPixelFormat pixelFormat = videoFormat.first.toPixelFormat();\n> -\t\tif (!pixelFormat)\n> +\t\tPixelFormat pixelFormat = videoFormat.first.toPixelFormat(false);\n\nWe could pass a debug level to toPixelFormat() instead of a boolean, but\nif I were to be asked to do so, I'd think it's too much yak shaving :-)\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +\t\tif (!pixelFormat) {\n> +\t\t\tLOG(SimplePipeline, Debug)\n> +\t\t\t\t<< \"Unsupported V4L2 pixel format \"\n> +\t\t\t\t<< videoFormat.first.toString();\n> +\n>  \t\t\tcontinue;\n> +\t\t}\n>  \n>  \t\tConfiguration config;\n>  \t\tconfig.code = code;","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id AB824C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 19 Nov 2025 04:19:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C53B260A80;\n\tWed, 19 Nov 2025 05:19:13 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6C60860856\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Nov 2025 05:19:12 +0100 (CET)","from pendragon.ideasonboard.com (unknown [205.220.129.225])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 6689D195E; \n\tWed, 19 Nov 2025 05:17:05 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"hejjD+zB\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763525828;\n\tbh=L/j54h8CbuNSBc1kSMXNX0+SVRx42M33gcnmJnvgbqY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=hejjD+zBkSQf+tui4cwcFb6pEWxXaqTgVgef8p8pBkMLSwHKM7fuRN3nHn/KhqAYN\n\t/mbL26UEVep73Lmu+UqMfXDTJJoZzpx0lQGszL0BsEXqWTn/XeQAdIEYDoC3p086Z0\n\t2hHbTqlBH/2Fh5TtQUEQ21dyGo0d9jSKcztnQu4c=","Date":"Wed, 19 Nov 2025 13:18:39 +0900","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>, =?utf-8?q?Barna?=\n\t=?utf-8?b?YsOhcyBQxZFjemU=?= <barnabas.pocze@ideasonboard.com>","Subject":"Re: [PATCH v2] pipeline: simple: Reduce warning of unknown pixel\n\tformats","Message-ID":"<20251119041839.GG10711@pendragon.ideasonboard.com>","References":"<20251118132720.18468-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20251118132720.18468-1-kieran.bingham@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]