Patch Detail
Show a patch.
GET /api/patches/210/?format=api
{ "id": 210, "url": "https://patchwork.libcamera.org/api/patches/210/?format=api", "web_url": "https://patchwork.libcamera.org/patch/210/", "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": "<20190111160737.25094-1-jacopo@jmondi.org>", "date": "2019-01-11T16:07:37", "name": "[libcamera-devel] libcamera: Add debug printouts", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "a2d5ef7afb5f815dd7ab5075dc00fe1d09c0f289", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/210/mbox/", "series": [ { "id": 71, "url": "https://patchwork.libcamera.org/api/series/71/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=71", "date": "2019-01-11T16:07:37", "name": "[libcamera-devel] libcamera: Add debug printouts", "version": 1, "mbox": "https://patchwork.libcamera.org/series/71/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/210/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/210/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B8AF260B13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 11 Jan 2019 17:07:36 +0100 (CET)", "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id 47273200004;\n\tFri, 11 Jan 2019 16:07:36 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 11 Jan 2019 17:07:37 +0100", "Message-Id": "<20190111160737.25094-1-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] libcamera: Add debug printouts", "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": "Fri, 11 Jan 2019 16:07:36 -0000" }, "content": "Add a few debug printouts that help follow the library intialization\nprocess: what pipeline handlers are registered, what media devices are\ncreated, and which pipeline manager gets matches with the current\nsystem.\n\nThe resulting output is the following, on IPU3 devices:\nDBG pipeline_handler.cpp:119 Pipeline handler: \"PipeHandlerVimc\" registered\nDBG pipeline_handler.cpp:119 Pipeline handler: \"PipelineHandlerIPU3\" registered\nDBG device_enumerator.cpp:214 New media device: ipu3-imgu created from: /dev/media0\nDBG device_enumerator.cpp:214 New media device: ipu3-cio2 created from: /dev/media1\nDBG device_enumerator.cpp:255 Succesfull match for media device: ipu3-cio2\nDBG device_enumerator.cpp:255 Succesfull match for media device: ipu3-imgu\nDBG pipeline_handler.cpp:150 Pipeline handler: \"PipelineHandlerIPU3\" matched\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/device_enumerator.cpp | 8 +++++++-\n src/libcamera/pipeline_handler.cpp | 5 ++++-\n 2 files changed, 11 insertions(+), 2 deletions(-)\n\n--\n2.20.1", "diff": "diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp\nindex 0d18e75..c1ddd7c 100644\n--- a/src/libcamera/device_enumerator.cpp\n+++ b/src/libcamera/device_enumerator.cpp\n@@ -211,6 +211,9 @@ int DeviceEnumerator::addDevice(const std::string &devnode)\n \t\treturn ret;\n \t}\n\n+\tLOG(Debug) << \"New media device: \" << media->driver()\n+\t\t << \" created from: \" << devnode;\n+\n \t/* Associate entities to device node paths. */\n \tfor (MediaEntity *entity : media->entities()) {\n \t\tif (entity->deviceMajor() == 0 && entity->deviceMinor() == 0)\n@@ -248,8 +251,11 @@ MediaDevice *DeviceEnumerator::search(const DeviceMatch &dm) const\n \t\tif (dev->busy())\n \t\t\tcontinue;\n\n-\t\tif (dm.match(dev))\n+\t\tif (dm.match(dev)) {\n+\t\t\tLOG(Debug) << \"Succesfull match for media device: \"\n+\t\t\t\t << dev->driver();\n \t\t\treturn dev;\n+\t\t}\n \t}\n\n \treturn nullptr;\ndiff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\nindex ee76948..9299c28 100644\n--- a/src/libcamera/pipeline_handler.cpp\n+++ b/src/libcamera/pipeline_handler.cpp\n@@ -116,6 +116,7 @@ void PipelineHandlerFactory::registerType(const std::string &name,\n \t\treturn;\n \t}\n\n+\tLOG(Debug) << \"Pipeline handler: \\\"\" << name << \"\\\" registered\";\n \tfactories[name] = factory;\n }\n\n@@ -145,8 +146,10 @@ PipelineHandler *PipelineHandlerFactory::create(const std::string &name,\n\n \tPipelineHandler *pipe = it->second->create();\n\n-\tif (pipe->match(enumerator))\n+\tif (pipe->match(enumerator)) {\n+\t\tLOG(Debug) << \"Pipeline handler: \\\"\" << name << \"\\\" matched\";\n \t\treturn pipe;\n+\t}\n\n \tdelete pipe;\n \treturn nullptr;\n", "prefixes": [ "libcamera-devel" ] }