Show a patch.

GET /api/patches/12207/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 12207,
    "url": "https://patchwork.libcamera.org/api/patches/12207/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/12207/",
    "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": "<20210506120523.969609-1-kieran.bingham@ideasonboard.com>",
    "date": "2021-05-06T12:05:23",
    "name": "[libcamera-devel] libcamera: v4l2_subdevice: Report subdev device node on logs",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "45e07ba4cb4f6975a21d38f95ba21b9bf0743b61",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": {
        "id": 11,
        "url": "https://patchwork.libcamera.org/api/users/11/?format=api",
        "username": "kbingham",
        "first_name": "Kieran",
        "last_name": "Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/12207/mbox/",
    "series": [
        {
            "id": 2003,
            "url": "https://patchwork.libcamera.org/api/series/2003/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2003",
            "date": "2021-05-06T12:05:23",
            "name": "[libcamera-devel] libcamera: v4l2_subdevice: Report subdev device node on logs",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2003/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/12207/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/12207/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 C5313BDE7F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  6 May 2021 12:05:30 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F2A0268915;\n\tThu,  6 May 2021 14:05:29 +0200 (CEST)",
            "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 0C50A68901\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  6 May 2021 14:05:29 +0200 (CEST)",
            "from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net\n\t[86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8D85C4A5;\n\tThu,  6 May 2021 14:05:28 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"WJGFaLwq\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1620302728;\n\tbh=3F7Um/USRHu9C2E/fOUQjAtuQTfpVAdz+vKd/PO+6Gw=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=WJGFaLwqDzWeUmOYfH/BbVhA2tJRUZbiS1NWI+FdxbdJLJA5adHSQhK1Mwo0bv1G5\n\tsYIVJqC+BbXm88u8i9PafaoahQkUToKe6gDPgeFTt87M2pMYeDsXr+MRcNiV8nsMla\n\t7QqAnbNcxCQeqhFBxrS7jaiTi/sbXj1PBnHOngew=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Thu,  6 May 2021 13:05:23 +0100",
        "Message-Id": "<20210506120523.969609-1-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Report subdev\n\tdevice node on logs",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The V4L2 Video device logs the deviceNode() as part of it's logging\nprefix, but the Subdevices have not been updated in the same way.\n\nThere have been several occasions while debugging remotely, where users\nwould benefit from knowing which subdevice node is referenced by the\nCameraSensor in the messages being printed, and adding it aligns the\noutput of the Video class with the Subdevice class.\n\nThis patch adds the /dev/v4l-subdev1 style string to the log message as\ndemonstrated here (from a fictitious additional log message):\n\n[88:39:36.684494647] [969224]  INFO V4L2 v4l2_subdevice.cpp:436 /dev/v4l-subdev1: 'Sensor B': Setting Format\n[88:36:13.308244848] [968664] DEBUG V4L2 v4l2_videodevice.cpp:1450 /dev/video6[22:cap]: Queueing buffer 0\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n\nYes, this makes the lines longer ;-( which makes me a little sad, but\naligns the two V4L2 types, and helps users find their device nodes when\nneeded/debugging...\n\n src/libcamera/v4l2_subdevice.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\nindex 721ff5a92a2b..fd464b0481aa 100644\n--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -461,7 +461,7 @@ V4L2Subdevice::fromEntityName(const MediaDevice *media,\n \n std::string V4L2Subdevice::logPrefix() const\n {\n-\treturn \"'\" + entity_->name() + \"'\";\n+\treturn deviceNode() + \": '\" + entity_->name() + \"'\";\n }\n \n std::vector<unsigned int> V4L2Subdevice::enumPadCodes(unsigned int pad)\n",
    "prefixes": [
        "libcamera-devel"
    ]
}