Patch Detail
Show a patch.
GET /api/1.1/patches/2494/?format=api
{ "id": 2494, "url": "https://patchwork.libcamera.org/api/1.1/patches/2494/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2494/", "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": "<20200104001414.12755-5-paul.elder@ideasonboard.com>", "date": "2020-01-04T00:14:12", "name": "[libcamera-devel,v6,4/5] libcamera: pipeline_handler: uvcvideo: register all Cameras along with a devnum", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "f767e7f631492d460b086fbb840931609e68386d", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2494/mbox/", "series": [ { "id": 599, "url": "https://patchwork.libcamera.org/api/1.1/series/599/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=599", "date": "2020-01-04T00:14:08", "name": "V4L2 compatibility layer", "version": 6, "mbox": "https://patchwork.libcamera.org/series/599/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2494/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2494/checks/", "tags": {}, "headers": { "Return-Path": "<paul.elder@ideasonboard.com>", "Received": [ "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 EEA14605DA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 4 Jan 2020 01:14:23 +0100 (CET)", "from neptunite.amanokami.net (unknown [96.44.9.94])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 379B830F;\n\tSat, 4 Jan 2020 01:14:23 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1578096863;\n\tbh=EuUij/mNWgXvN18diyrRfVUd9Q2QFz1/tGd4ergY5Lg=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=UQJ/d9msJry6s7PaLHwQYEwuBEO18YkiezJQNxfp70dQ6AM9qEwKmOv2ufXQ6Z87H\n\tW4EQJEdpa4wdQVAtn8tRtzRBDY3W9o/xyO9+mYwXAXFSi1fOHImFtYlN5VlmH8IO0M\n\txT4YkEi4pyYgcrFdt8DDIDMofAlnNgLbEcyggsUg=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 3 Jan 2020 19:14:12 -0500", "Message-Id": "<20200104001414.12755-5-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.24.1", "In-Reply-To": "<20200104001414.12755-1-paul.elder@ideasonboard.com>", "References": "<20200104001414.12755-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v6 4/5] libcamera: pipeline_handler:\n\tuvcvideo: register all Cameras along with a devnum", "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>", "X-List-Received-Date": "Sat, 04 Jan 2020 00:14:24 -0000" }, "content": "Register all UVC Cameras along with their device numbers, to eventually\nallow the V4L2 compatibility layer to match against it.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\n---\nChanges in v6:\n- cosmetic changes\n\nChanges in v5:\n- rebased on \"libcamera: pipeline: uvcvideo: Fix crash when default\n entity is not found\"\n\nNo change in v4\n\nNew in v3\n---\n src/libcamera/pipeline/uvcvideo.cpp | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\nindex fcc1c011..ce38445d 100644\n--- a/src/libcamera/pipeline/uvcvideo.cpp\n+++ b/src/libcamera/pipeline/uvcvideo.cpp\n@@ -7,6 +7,7 @@\n \n #include <algorithm>\n #include <iomanip>\n+#include <sys/sysmacros.h>\n #include <tuple>\n \n #include <libcamera/camera.h>\n@@ -309,10 +310,12 @@ bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator)\n \tif (data->init(*entity))\n \t\treturn false;\n \n+\tdev_t devnum = makedev((*entity)->deviceMajor(), (*entity)->deviceMinor());\n+\n \t/* Create and register the camera. */\n \tstd::set<Stream *> streams{ &data->stream_ };\n \tstd::shared_ptr<Camera> camera = Camera::create(this, media->model(), streams);\n-\tregisterCamera(std::move(camera), std::move(data));\n+\tregisterCamera(std::move(camera), std::move(data), devnum);\n \n \t/* Enable hot-unplug notifications. */\n \thotplugMediaDevice(media);\n", "prefixes": [ "libcamera-devel", "v6", "4/5" ] }