Patch Detail
Show a patch.
GET /api/1.1/patches/1961/?format=api
{ "id": 1961, "url": "https://patchwork.libcamera.org/api/1.1/patches/1961/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1961/", "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": "<20190912200330.19004-3-laurent.pinchart@ideasonboard.com>", "date": "2019-09-12T20:03:28", "name": "[libcamera-devel,2/4] libcamera: device_enumerator_udev: Delay device node lookup", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "2039d0866f3126655a605496eeac62914491bcfc", "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/1961/mbox/", "series": [ { "id": 487, "url": "https://patchwork.libcamera.org/api/1.1/series/487/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=487", "date": "2019-09-12T20:03:26", "name": "Fix udev device enumerator with V4L2 M2M devices", "version": 1, "mbox": "https://patchwork.libcamera.org/series/487/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1961/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1961/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 97FD260C1A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Sep 2019 22:03:45 +0200 (CEST)", "from pendragon.lan (bl10-204-24.dsl.telepac.pt [85.243.204.24])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0CEF633A;\n\tThu, 12 Sep 2019 22:03:44 +0200 (CEST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1568318625;\n\tbh=A5c81SPgvpkLHXknSmlBCbcSsOwAvMPMabq1kb1p0WU=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Sx0js3NTmZWjaFPmEDB/OuiX0urM9qOaNYTOriFNedLxt717NBhkhbA4Lj+rH8FrI\n\toA1+8wqJCK8LlUA53kL39gzz91hs9CkYyl+GkbIWFr3GQIjw+wGmFarLeOO6MT5MZW\n\tOyrDDl4SIdKf3H6TQKDFYnenaZKC7750oNJcqfSQ=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 12 Sep 2019 23:03:28 +0300", "Message-Id": "<20190912200330.19004-3-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20190912200330.19004-1-laurent.pinchart@ideasonboard.com>", "References": "<20190912200330.19004-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 2/4] libcamera: device_enumerator_udev:\n\tDelay device node lookup", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "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>", "X-List-Received-Date": "Thu, 12 Sep 2019 20:03:46 -0000" }, "content": "When populating media devices, we look up device nodes for every entity\nin the media device, regardless of if the entity is present in the\norphans list. This causes unnecessary lookups (that may also fail as the\ndevice node may not be ready yet at that time). Move the lookup at a\nlater time, when the device node is actually needed.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/device_enumerator_udev.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\nindex e0c646c997de..210f5c1f2870 100644\n--- a/src/libcamera/device_enumerator_udev.cpp\n+++ b/src/libcamera/device_enumerator_udev.cpp\n@@ -180,10 +180,10 @@ int DeviceEnumeratorUdev::populateMediaDevice(const std::shared_ptr<MediaDevice>\n \n \t\tdev_t devnum = makedev(entity->deviceMajor(),\n \t\t\t\t entity->deviceMinor());\n-\t\tstd::string deviceNode = lookupDeviceNode(devnum);\n \n \t\t/* Take device from orphan list first, if it is in the list. */\n \t\tif (std::find(orphans_.begin(), orphans_.end(), devnum) != orphans_.end()) {\n+\t\t\tstd::string deviceNode = lookupDeviceNode(devnum);\n \t\t\tif (deviceNode.empty())\n \t\t\t\treturn -EINVAL;\n \n", "prefixes": [ "libcamera-devel", "2/4" ] }