Patch Detail
Show a patch.
GET /api/1.1/patches/26329/?format=api
{ "id": 26329, "url": "https://patchwork.libcamera.org/api/1.1/patches/26329/?format=api", "web_url": "https://patchwork.libcamera.org/patch/26329/", "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": "<20260325092659.79453-2-barnabas.pocze@ideasonboard.com>", "date": "2026-03-25T09:26:57", "name": "[v1,2/4] libcamera: v4l2_device: Map `BITMASK` type to `Unsigned32`", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "f5bee59d555b5c91d37c1a5087ae178a9859bce0", "submitter": { "id": 216, "url": "https://patchwork.libcamera.org/api/1.1/people/216/?format=api", "name": "Barnabás Pőcze", "email": "barnabas.pocze@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/26329/mbox/", "series": [ { "id": 5844, "url": "https://patchwork.libcamera.org/api/1.1/series/5844/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5844", "date": "2026-03-25T09:26:56", "name": "[v1,1/4] libcamera: v4l2_device: Ensure consistent control types", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5844/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/26329/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/26329/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 73DBDC32DE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 25 Mar 2026 09:27:09 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AE77262791;\n\tWed, 25 Mar 2026 10:27:06 +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 4C1E362788\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Mar 2026 10:27:03 +0100 (CET)", "from pb-laptop.local (185.221.143.129.nat.pool.zt.hu\n\t[185.221.143.129])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 699CB10BE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Mar 2026 10:25:45 +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=\"uZ6pAgSu\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774430745;\n\tbh=+v+puT3yK+q+iwpXjtvEIhVH03OfgrhUDcLY/pIOADE=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=uZ6pAgSuzWoEMfOFPBzcGU6XsuUxVz8Y/FScR4/l+X3vn8J1n4e6QrD1OG7Wx55IZ\n\tB259NH0GXnL2O8hxrt4ud8nk2Va5Fp1U6+KfCci1c+OjSE+FU+qL8P9babfnxHokdN\n\tkC54WfYUXC/TIywt2ceTq3r6mzH6HDG1s2cRptLU=", "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Subject": "[PATCH v1 2/4] libcamera: v4l2_device: Map `BITMASK` type to\n\t`Unsigned32`", "Date": "Wed, 25 Mar 2026 10:26:57 +0100", "Message-ID": "<20260325092659.79453-2-barnabas.pocze@ideasonboard.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260325092659.79453-1-barnabas.pocze@ideasonboard.com>", "References": "<20260325092659.79453-1-barnabas.pocze@ideasonboard.com>", "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": "A bitmask is conceptually an unsigned integer, as implied by the documentation:\n\n The maximum value is interpreted as a __u32,\n allowing the use of bit 31 in the bitmask.\n\nso map it to a 32-bit unsigned integer. Adjust the rkisp1 pipeline handler\naccordingly.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 4 +---\n src/libcamera/v4l2_device.cpp | 3 ++-\n 2 files changed, 3 insertions(+), 4 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 320a4dc5a..c14b57322 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -1479,9 +1479,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n \tif (controls.find(RKISP1_CID_SUPPORTED_PARAMS_BLOCKS) != controls.end()) {\n \t\tauto list = param_->getControls({ { RKISP1_CID_SUPPORTED_PARAMS_BLOCKS } });\n \t\tif (!list.empty())\n-\t\t\tsupportedBlocks = static_cast<uint32_t>(\n-\t\t\t\tlist.get(RKISP1_CID_SUPPORTED_PARAMS_BLOCKS)\n-\t\t\t\t\t.get<int32_t>());\n+\t\t\tsupportedBlocks = list.get(RKISP1_CID_SUPPORTED_PARAMS_BLOCKS).get<uint32_t>();\n \t} else {\n \t\tLOG(RkISP1, Error)\n \t\t\t<< \"Failed to query supported params blocks. Falling back to defaults.\";\ndiff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex e0099cb7a..db1eb70e4 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -572,6 +572,7 @@ ControlType V4L2Device::v4l2CtrlType(uint32_t ctrlType)\n \t\treturn ControlTypeUnsigned16;\n \n \tcase V4L2_CTRL_TYPE_U32:\n+\tcase V4L2_CTRL_TYPE_BITMASK:\n \t\treturn ControlTypeUnsigned32;\n \n \tcase V4L2_CTRL_TYPE_INTEGER:\n@@ -582,7 +583,6 @@ ControlType V4L2Device::v4l2CtrlType(uint32_t ctrlType)\n \n \tcase V4L2_CTRL_TYPE_MENU:\n \tcase V4L2_CTRL_TYPE_BUTTON:\n-\tcase V4L2_CTRL_TYPE_BITMASK:\n \tcase V4L2_CTRL_TYPE_INTEGER_MENU:\n \t\t/*\n \t\t * More precise types may be needed, for now use a 32-bit\n@@ -636,6 +636,7 @@ std::optional<ControlInfo> V4L2Device::v4l2ControlInfo(const v4l2_query_ext_ctrl\n \t\t\t\t static_cast<uint16_t>(ctrl.default_value));\n \n \tcase V4L2_CTRL_TYPE_U32:\n+\tcase V4L2_CTRL_TYPE_BITMASK:\n \t\treturn ControlInfo(static_cast<uint32_t>(ctrl.minimum),\n \t\t\t\t static_cast<uint32_t>(ctrl.maximum),\n \t\t\t\t static_cast<uint32_t>(ctrl.default_value));\n", "prefixes": [ "v1", "2/4" ] }