Patch Detail
Show a patch.
GET /api/patches/25079/?format=api
{ "id": 25079, "url": "https://patchwork.libcamera.org/api/patches/25079/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25079/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20251118132720.18468-1-kieran.bingham@ideasonboard.com>", "date": "2025-11-18T13:27:19", "name": "[v2] pipeline: simple: Reduce warning of unknown pixel formats", "commit_ref": "517b863bae2db2dd0c56366119318d6b2fb9ad52", "pull_url": null, "state": "accepted", "archived": false, "hash": "e09430af2364e3a28c2b7a0325da7b47616ace93", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25079/mbox/", "series": [ { "id": 5594, "url": "https://patchwork.libcamera.org/api/series/5594/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5594", "date": "2025-11-18T13:27:19", "name": "[v2] pipeline: simple: Reduce warning of unknown pixel formats", "version": 2, "mbox": "https://patchwork.libcamera.org/series/5594/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25079/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25079/checks/", "tags": {}, "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 5E056BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 18 Nov 2025 13:27:29 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0F28060A9D;\n\tTue, 18 Nov 2025 14:27:28 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B9E62606D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 18 Nov 2025 14:27:25 +0100 (CET)", "from charm.hippo-penny.ts.net\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6D2BD1E33;\n\tTue, 18 Nov 2025 14:25:21 +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=\"gMaMCldX\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763472321;\n\tbh=QbXBG/9PlFjgkCPKUXIKK6MON1nBUUW0dLNrl2T2uug=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=gMaMCldXGylVvafaL/ze401eYuiBEH9ktYDiPoSXWENCEFanoRQmq2XMxckx7hapF\n\tWv4H0Lu4gom7+DJ7aPsJcUWz4nkYTW/dlsfLVN0PA6pMq77C7Hp5/+m4Qk+01N5hy8\n\tfTpdDrAkzXiS5mTZYvil1fPC9LaezITEoZpKBGLc=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Cc": "Kieran Bingham <kieran.bingham@ideasonboard.com>, Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>, =?utf-8?b?QmFybmFiw6FzIFDFkWN6?=\n\t=?utf-8?q?e?= <barnabas.pocze@ideasonboard.com>", "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", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "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>" }, "content": "The Simple Pipeline is designed to support a wide variety of pipeline\nconfigurations and attached devices and will enumerate the pixel formats\nof the connected sensors to map these to libcamera formats where\navailable.\n\nIn fixed pipelines, where the pixel format is not mapped correctly it is\na desired behaviour to express this warning so that the pixelformat can\nbe added, while in the simple-pipeline case we do not expect warnings\nfor every discovered pixel format which is not supported by libcamera.\n\nThis currently manifests itself as very highly verbose warnings about\nunsupported pixel formats are not desired when there are working formats\nthat have already been enumerated.\n\nFortunately in commit 434edb7b4480 (\"libcamera: formats: Fix warning for\nunknown V4L2 pixfmt\") we have a mechanism to disable the warning for\noccasions where we wish to ignore unsupported formats.\n\nUse this feature to disable the warning in the core V4L2PixelFormat and\ninstead report only a debug level print from the simple pipeline\nhandler.\n\nOn devices such as the Pinephone, this removes overly verbose warnings\nfor 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\nCloses: https://gitlab.freedesktop.org/camera/libcamera/-/issues/291\nSuggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n---\nv2:\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(-)", "diff": "diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\nindex 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+\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;\n", "prefixes": [ "v2" ] }