Patch Detail
Show a patch.
GET /api/patches/18795/?format=api
{ "id": 18795, "url": "https://patchwork.libcamera.org/api/patches/18795/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18795/", "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": "<20230609-empty-devnode-v3-1-c08f450ba062@skidata.com>", "date": "2023-07-06T11:41:11", "name": "[libcamera-devel,v3] libcamera: device_enumerator: ensure deviceNode is not empty", "commit_ref": "90fa9a0f2b6dc209e22950a871a79343661e1d09", "pull_url": null, "state": "accepted", "archived": false, "hash": "6db2d34353e3aaa8a6563a04472e2ef15556eba8", "submitter": { "id": 163, "url": "https://patchwork.libcamera.org/api/people/163/?format=api", "name": "Benjamin Bara", "email": "bbara93@gmail.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18795/mbox/", "series": [ { "id": 3959, "url": "https://patchwork.libcamera.org/api/series/3959/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3959", "date": "2023-07-06T11:41:11", "name": "[libcamera-devel,v3] libcamera: device_enumerator: ensure deviceNode is not empty", "version": 3, "mbox": "https://patchwork.libcamera.org/series/3959/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18795/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18795/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 0E20CC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 6 Jul 2023 11:41:31 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 63F95628C1;\n\tThu, 6 Jul 2023 13:41:30 +0200 (CEST)", "from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com\n\t[IPv6:2a00:1450:4864:20::32b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F16C861E36\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 6 Jul 2023 13:41:28 +0200 (CEST)", "by mail-wm1-x32b.google.com with SMTP id\n\t5b1f17b1804b1-3fbc5d5746cso6239815e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 06 Jul 2023 04:41:28 -0700 (PDT)", "from [127.0.1.1] ([91.230.2.244]) by smtp.gmail.com with ESMTPSA id\n\t10-20020a05600c024a00b003fa98908014sm4867846wmj.8.2023.07.06.04.41.27\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 06 Jul 2023 04:41:27 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1688643690;\n\tbh=svaVgMmJeTeFlRcLFZlfCCC7WfooFhxjlxuvK2sH6l8=;\n\th=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=wkmMiCsQtd56gKq8AKKqPBQE7+5SEI0TDoIq6O0Sntyy0NatufzF/Hn2u/xMVezuB\n\tsq0PuJa+G/RHeinjeSED7PlHfMnflr8nx4GBUy9bQD8acQkau9I/eREn7pqbyOkRsO\n\tKK4uevfN5mucNHSupZOeKvA8f786K5xRFQZYcIpl2OPOPpzKFAsGL9HGwsUdnXpdWx\n\tZxYJzQhQDjLNbJYmYwKWREkWDh6oobbQRevEtE/T+vlC6Dd3IIMDkFJLhaQzpQ5zoz\n\tdqIUfcr7+50oq2LV115GgdiNuXLUCzVyOJh2k3IGBUGaxnNoS2m4Ots1hWkYODt0DC\n\tBUzg6ksRYACEA==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20221208; t=1688643688; x=1691235688;\n\th=cc:to:message-id:content-transfer-encoding:mime-version:subject\n\t:date:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=RNiz3O1qGfnkTZawbK+OJQZhl/fxTx2O5xiq5DI9yfc=;\n\tb=hkn2UnMdka+Y2ndTZgyJssgzRJbNIBs1yZr4qPjlR+8e82bCqZyEzikq6qAgrQNAyo\n\triALRCZXvujxeLX+dM2Z1FEzza5DG1em8SwIqiCIzMDQZuF65McgqvkYTZvV929ESXPh\n\tXwsgrvgpX55EUhPHnqJCgnlboCPSJUAXYoU8MfrEr9aYDPCduHZbP8H7FhJousSG3RNA\n\tmDV2H79SZ/eyWBjrQSKPHlzE+VQF2oOgvP3cBeXQRFRtG3LpvUu8q2n1j5qWrvlmrZsT\n\t/cCp48vf6VXlzPoJ1qbveGj2Cej8z0BXn98HM/PDRtBtWPfLru8XE/eWglQ4eBPHSt1E\n\t+NJw==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"hkn2UnMd\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1688643688; x=1691235688;\n\th=cc:to:message-id:content-transfer-encoding:mime-version:subject\n\t:date:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=RNiz3O1qGfnkTZawbK+OJQZhl/fxTx2O5xiq5DI9yfc=;\n\tb=lSz5UZe3j8duK1ZV+VhZYqs14vzMQJi5mrQczcA5C7jCgRLLyd1Hm/HLKFLRXVUf+a\n\tJPqbMTp8eCYPXtSr6sPzJvNYZz/mgPXgfeCDH2YwM2I5hbfk+Pht1bO4fP5vLXzme8z5\n\tTBI3/RACFxSw7tPaxe4Dj2BpVvrifO6qf1V5vDsddoPtuw8NOJqIVTCbtT5wxYJGl9Ns\n\ttfMix56up7cfgm8XOARZXCirSeUjfZB1lR2eFB2tDsokHQCJ6HjSAZzEpd9yB54kucX0\n\t1txAtujxDsSW9hTS1cJMsNlj7RnSmnNP8vgTPwQkE/secaabNaYLp5jQ2KmTiMY0+Lq0\n\tzL1Q==", "X-Gm-Message-State": "ABy/qLaKoMIXdi8dgpqy1ROn1TOBjm2NkV7vHWfMDpuIQE7yoxv+y2FM\n\tUeTVEPeyJaSlrE1QzNyEd/KZQwe2OEU=", "X-Google-Smtp-Source": "APBJJlGndTmxCxHcKkrGJW13azFbMTrxhnRoIeWn7fcizRBHn4NmSyycvzifkN/WrI5k47Zf15A4Jg==", "X-Received": "by 2002:a7b:c5d3:0:b0:3fa:934c:8356 with SMTP id\n\tn19-20020a7bc5d3000000b003fa934c8356mr1261953wmk.10.1688643688082; \n\tThu, 06 Jul 2023 04:41:28 -0700 (PDT)", "Date": "Thu, 06 Jul 2023 13:41:11 +0200", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20230609-empty-devnode-v3-1-c08f450ba062@skidata.com>", "X-B4-Tracking": "v=1; b=H4sIAFaopmQC/32NQQ6DIBBFr2JYlwbQSO2q92i6GJmxkkYwYEiN8\n\te4Fd120yzeT99/GIgVLkV2rjQVKNlrvMtSnipkR3JO4xcxMCVWLVnScpnlZOVJyHonXLaJqG22\n\tQBMtOD5F4H8CZsVgTxIVCecyBBvs+QvdH5tHGxYf16CZZrr8SSXLJSZlaG91rNN0tvizCAmfjJ\n\t1a2kvrrq+xfFEhJugEY8Nvf9/0DKWKbpQUBAAA=", "To": "libcamera-devel@lists.libcamera.org", "X-Mailer": "b4 0.12.2", "Subject": "[libcamera-devel] [PATCH v3] libcamera: device_enumerator: ensure\n\tdeviceNode is not empty", "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>", "From": "Benjamin Bara via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "Benjamin Bara <bbara93@gmail.com>", "Cc": "Benjamin Bara <benjamin.bara@skidata.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "From: Benjamin Bara <benjamin.bara@skidata.com>\n\nWhen activating both ISP nodes on the i.MX8MP, but only connecting one\ncamera sensor, libcamera aborts because it couldn't find the chosen\nentity's device node:\n\n[37:54:40.779902250] [3631] DEBUG DeviceEnumerator device_enumerator.cpp:252 Added device /dev/media1: rkisp1\n[37:54:40.780196750] [3631] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found\n[37:54:40.780237875] [3631] DEBUG DeviceEnumerator device_enumerator.cpp:252 Added device /dev/media0: rkisp1\n[37:54:40.780505125] [3631] DEBUG Camera camera_manager.cpp:152 Found registered pipeline handler 'PipelineHandlerRkISP1'\n[37:54:40.780599875] [3631] DEBUG DeviceEnumerator device_enumerator.cpp:312 Successful match for media device \"rkisp1\"\n[37:54:40.780731375] [3631] ERROR V4L2 v4l2_device.cpp:93 'rkisp1_isp': Failed to open V4L2 device '': No such file or directory\n\nFix this by skipping empty device nodes:\n\n[37:49:05.172672000] [3603] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media1 found\n[37:49:05.172720625] [3603] DEBUG DeviceEnumerator device_enumerator.cpp:256 Added device /dev/media1: rkisp1\n[37:49:05.172973875] [3603] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found\n[37:49:05.173012125] [3603] DEBUG DeviceEnumerator device_enumerator.cpp:256 Added device /dev/media0: rkisp1\n[37:49:05.173281625] [3603] DEBUG Camera camera_manager.cpp:152 Found registered pipeline handler 'PipelineHandlerRkISP1'\n[37:49:05.173376875] [3603] DEBUG DeviceEnumerator device_enumerator.cpp:107 Skip rkisp1_isp: no device node\n[37:49:05.173414375] [3603] DEBUG DeviceEnumerator device_enumerator.cpp:316 Successful match for media device \"rkisp1\"\n[37:49:05.173671250] [3603] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video1[15:cap]: Opened device platform:rkisp1: rkisp1: rkisp1_stats\n[37:49:05.173775125] [3603] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video2[16:out]: Opened device platform:rkisp1: rkisp1: rkisp1_params\n[37:49:05.173880500] [3603] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video0[18:cap]: Opened device platform:rkisp1: rkisp1: rkisp1\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Benjamin Bara <benjamin.bara@skidata.com>\n---\nHi!\n\nThe dots look like this:\n\n/dev/media0:\ndigraph board {\n rankdir=TB\n n00000001 [label=\"{{<port0> 0 | <port1> 1} | rkisp1_isp\\n | {<port2> 2 | <port3> 3}}\", shape=Mrecord, style=filled, fillcolor=green]\n n00000001:port2 -> n00000006:port0\n n00000001:port3 -> n0000000d [style=bold]\n n00000006 [label=\"{{<port0> 0} | rkisp1_resizer_mainpath\\n | {<port1> 1}}\", shape=Mrecord, style=filled, fillcolor=green]\n n00000006:port1 -> n00000009 [style=bold]\n n00000009 [label=\"rkisp1_mainpath\\n/dev/video0\", shape=box, style=filled, fillcolor=yellow]\n n0000000d [label=\"rkisp1_stats\\n/dev/video1\", shape=box, style=filled, fillcolor=yellow]\n n00000011 [label=\"rkisp1_params\\n/dev/video2\", shape=box, style=filled, fillcolor=yellow]\n n00000011 -> n00000001:port1 [style=bold]\n n0000001d [label=\"{{<port0> 0} | csis-32e40000.csi\\n | {<port1> 1}}\", shape=Mrecord, style=filled, fillcolor=green]\n n0000001d:port1 -> n00000001:port0\n}\n\n/dev/media1:\ndigraph board {\n rankdir=TB\n n00000001 [label=\"{{<port0> 0 | <port1> 1} | rkisp1_isp\\n/dev/v4l-subdev0 | {<port2> 2 | <port3> 3}}\", shape=Mrecord, style=filled, fillcolor=green]\n n00000001:port2 -> n00000006:port0\n n00000001:port3 -> n0000000d [style=bold]\n n00000006 [label=\"{{<port0> 0} | rkisp1_resizer_mainpath\\n/dev/v4l-subdev1 | {<port1> 1}}\", shape=Mrecord, style=filled, fillcolor=green]\n n00000006:port1 -> n00000009 [style=bold]\n n00000009 [label=\"rkisp1_mainpath\\n/dev/video3\", shape=box, style=filled, fillcolor=yellow]\n n0000000d [label=\"rkisp1_stats\\n/dev/video4\", shape=box, style=filled, fillcolor=yellow]\n n00000011 [label=\"rkisp1_params\\n/dev/video5\", shape=box, style=filled, fillcolor=yellow]\n n00000011 -> n00000001:port1 [style=bold]\n n0000001d [label=\"{{<port0> 0} | csis-32e50000.csi\\n/dev/v4l-subdev2 | {<port1> 1}}\", shape=Mrecord, style=filled, fillcolor=green]\n n0000001d:port1 -> n00000001:port0\n n00000022 [label=\"{{} | imx327 8-001a\\n/dev/v4l-subdev3 | {<port0> 0}}\", shape=Mrecord, style=filled, fillcolor=green]\n n00000022:port0 -> n0000001d:port0\n}\n---\nChanges in v3:\n- adapt check (thx to Kieran)\n- Link to v2: https://lists.libcamera.org/pipermail/libcamera-devel/2023-June/038182.html\n\nChanges in v2:\n- adapt commit message\n- Link to v1: https://lists.libcamera.org/pipermail/libcamera-devel/2023-June/038181.html\n---\n src/libcamera/device_enumerator.cpp | 10 ++++++++--\n 1 file changed, 8 insertions(+), 2 deletions(-)\n\n\n---\nbase-commit: 0ee9339331c648232e87d2de2ccd5a92cc61cab2\nchange-id: 20230609-empty-devnode-36dd2647cde0\n\nBest regards,", "diff": "diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp\nindex f2e055de..42b5ba6c 100644\n--- a/src/libcamera/device_enumerator.cpp\n+++ b/src/libcamera/device_enumerator.cpp\n@@ -101,8 +101,14 @@ bool DeviceMatch::match(const MediaDevice *device) const\n \n \t\tfor (const MediaEntity *entity : device->entities()) {\n \t\t\tif (name == entity->name()) {\n-\t\t\t\tfound = true;\n-\t\t\t\tbreak;\n+\t\t\t\tif (!entity->deviceNode().empty()) {\n+\t\t\t\t\tfound = true;\n+\t\t\t\t\tbreak;\n+\t\t\t\t} else {\n+\t\t\t\t\tLOG(DeviceEnumerator, Debug)\n+\t\t\t\t\t\t<< \"Skip \" << entity->name()\n+\t\t\t\t\t\t<< \": no device node\";\n+\t\t\t\t}\n \t\t\t}\n \t\t}\n \n", "prefixes": [ "libcamera-devel", "v3" ] }