Patch Detail
Show a patch.
GET /api/1.1/patches/19592/?format=api
{ "id": 19592, "url": "https://patchwork.libcamera.org/api/1.1/patches/19592/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19592/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20240301212121.9072-2-laurent.pinchart@ideasonboard.com>", "date": "2024-03-01T21:20:50", "name": "[PATCH/RFC,01/32] libcamera: v4l2_subdevice: Rename V4L2SubdeviceFormatInfo", "commit_ref": null, "pull_url": null, "state": "rfc", "archived": false, "hash": "f59cd4ea5e2190aff063b3de9ff7f99547100eda", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19592/mbox/", "series": [ { "id": 4197, "url": "https://patchwork.libcamera.org/api/1.1/series/4197/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4197", "date": "2024-03-01T21:20:49", "name": "libcamera: Support the upstream Unicam driver", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4197/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19592/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19592/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 BBDC1C3260\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 1 Mar 2024 21:21:23 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EB36D62874;\n\tFri, 1 Mar 2024 22:21:21 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 877BB62865\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 1 Mar 2024 22:21:20 +0100 (CET)", "from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi\n\t[89.27.53.110])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1683DA9A;\n\tFri, 1 Mar 2024 22:21:06 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"TBe84TG/\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1709328066;\n\tbh=3LkrSUFbAXG1cHSF3thfKl7/pxdzG1CXkpL1z9sYqCs=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=TBe84TG/CjFSgAJyRdR0MoElxDQVQ2wJeLQmS70rWsHEREEHb4hfw35ZyNdf6XjEs\n\t0saFv+R8jlAMNxLbBGkxJ4cQZx9biHjL/k8aPljUdijr8EfEt+L5Xr4fZ73zwk9kSi\n\tU/MhCTqMAlvABXPwn35nxdFAFSO2GIqiNDOVnwbw=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Subject": "[PATCH/RFC 01/32] libcamera: v4l2_subdevice: Rename\n\tV4L2SubdeviceFormatInfo", "Date": "Fri, 1 Mar 2024 23:20:50 +0200", "Message-ID": "<20240301212121.9072-2-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20240301212121.9072-1-laurent.pinchart@ideasonboard.com>", "References": "<20240301212121.9072-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "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>", "Cc": "Sakari Ailus <sakari.ailus@iki.fi>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The V4L2SubdeviceFormatInfo structure contains information about a media\nbus format, not a V4L2 subdevice format. Rename it to MediaBusFormatInfo\nto clarify its purpose. Rename the formatInfoMap map accordingly.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/libcamera/v4l2_subdevice.cpp | 22 +++++++++++-----------\n 1 file changed, 11 insertions(+), 11 deletions(-)", "diff": "diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\nindex 6d0785b7b484..6c1df7812f07 100644\n--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -39,24 +39,24 @@ LOG_DECLARE_CATEGORY(V4L2)\n namespace {\n \n /*\n- * \\struct V4L2SubdeviceFormatInfo\n+ * \\struct MediaBusFormatInfo\n * \\brief Information about media bus formats\n * \\param bitsPerPixel Bits per pixel\n * \\param name Name of MBUS format\n * \\param colourEncoding Type of colour encoding\n */\n-struct V4L2SubdeviceFormatInfo {\n+struct MediaBusFormatInfo {\n \tunsigned int bitsPerPixel;\n \tconst char *name;\n \tPixelFormatInfo::ColourEncoding colourEncoding;\n };\n \n /*\n- * \\var formatInfoMap\n- * \\brief A map that associates V4L2SubdeviceFormatInfo struct to V4L2 media\n+ * \\var mediaBusFormatInfo\n+ * \\brief A map that associates MediaBusFormatInfo struct to V4L2 media\n * bus codes\n */\n-const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n+const std::map<uint32_t, MediaBusFormatInfo> mediaBusFormatInfo = {\n \t/* This table is sorted to match the order in linux/media-bus-format.h */\n \t{ MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE, { 16, \"RGB444_2X8_PADHI_BE\", PixelFormatInfo::ColourEncodingRGB } },\n \t{ MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, { 16, \"RGB444_2X8_PADHI_LE\", PixelFormatInfo::ColourEncodingRGB } },\n@@ -237,8 +237,8 @@ const std::string V4L2SubdeviceFormat::toString() const\n */\n uint8_t V4L2SubdeviceFormat::bitsPerPixel() const\n {\n-\tconst auto it = formatInfoMap.find(mbus_code);\n-\tif (it == formatInfoMap.end()) {\n+\tconst auto it = mediaBusFormatInfo.find(mbus_code);\n+\tif (it == mediaBusFormatInfo.end()) {\n \t\tLOG(V4L2, Error) << \"No information available for format '\"\n \t\t\t\t << *this << \"'\";\n \t\treturn 0;\n@@ -258,9 +258,9 @@ std::ostream &operator<<(std::ostream &out, const V4L2SubdeviceFormat &f)\n {\n \tout << f.size << \"-\";\n \n-\tconst auto it = formatInfoMap.find(f.mbus_code);\n+\tconst auto it = mediaBusFormatInfo.find(f.mbus_code);\n \n-\tif (it == formatInfoMap.end())\n+\tif (it == mediaBusFormatInfo.end())\n \t\tout << utils::hex(f.mbus_code, 4);\n \telse\n \t\tout << it->second.name;\n@@ -511,8 +511,8 @@ std::optional<ColorSpace> V4L2Subdevice::toColorSpace(const v4l2_mbus_framefmt &\n \t\treturn std::nullopt;\n \n \tPixelFormatInfo::ColourEncoding colourEncoding;\n-\tauto iter = formatInfoMap.find(format.code);\n-\tif (iter != formatInfoMap.end()) {\n+\tauto iter = mediaBusFormatInfo.find(format.code);\n+\tif (iter != mediaBusFormatInfo.end()) {\n \t\tcolourEncoding = iter->second.colourEncoding;\n \t} else {\n \t\tLOG(V4L2, Warning)\n", "prefixes": [ "PATCH/RFC", "01/32" ] }