Show a patch.

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

{
    "id": 11527,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/11527/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11527/",
    "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": "<20210309063829.8710-2-dafna.hirschfeld@collabora.com>",
    "date": "2021-03-09T06:38:27",
    "name": "[libcamera-devel,v3,1/3] libcamera: media_device: add hwRevision method",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "bcd5c0c4e22f97018474f1dc037f189d1823d956",
    "submitter": {
        "id": 46,
        "url": "https://patchwork.libcamera.org/api/1.1/people/46/?format=api",
        "name": "Dafna Hirschfeld",
        "email": "dafna.hirschfeld@collabora.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/11527/mbox/",
    "series": [
        {
            "id": 1775,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1775/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1775",
            "date": "2021-03-09T06:38:27",
            "name": "rkisp1: add an initial support to different hw revision",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/1775/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11527/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11527/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 2A162BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Mar 2021 06:38:40 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 50AA768AA3;\n\tTue,  9 Mar 2021 07:38:39 +0100 (CET)",
            "from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D0C116051F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Mar 2021 07:38:37 +0100 (CET)",
            "from [127.0.0.1] (localhost [127.0.0.1])\n\t(Authenticated sender: dafna) with ESMTPSA id 9D9041F45216"
        ],
        "From": "Dafna Hirschfeld <dafna.hirschfeld@collabora.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  9 Mar 2021 07:38:27 +0100",
        "Message-Id": "<20210309063829.8710-2-dafna.hirschfeld@collabora.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20210309063829.8710-1-dafna.hirschfeld@collabora.com>",
        "References": "<20210309063829.8710-1-dafna.hirschfeld@collabora.com>",
        "Subject": "[libcamera-devel] [PATCH v3 1/3] libcamera: media_device: add\n\thwRevision method",
        "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>",
        "Cc": "kernel@collabora.com",
        "MIME-Version": "1.0",
        "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": "Add a method 'hwRevision' to return the\ninfo.hw_version reported by the driver.\n\nSigned-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n include/libcamera/internal/media_device.h |  2 ++\n src/libcamera/media_device.cpp            | 10 ++++++++++\n 2 files changed, 12 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h\nindex d0459cde..c3292508 100644\n--- a/include/libcamera/internal/media_device.h\n+++ b/include/libcamera/internal/media_device.h\n@@ -41,6 +41,7 @@ public:\n \tconst std::string deviceNode() const { return deviceNode_; }\n \tconst std::string model() const { return model_; }\n \tunsigned int version() const { return version_; }\n+\tunsigned int hwRevision() const { return hwRevision_; }\n \n \tconst std::vector<MediaEntity *> &entities() const { return entities_; }\n \tMediaEntity *getEntityByName(const std::string &name) const;\n@@ -79,6 +80,7 @@ private:\n \tstd::string deviceNode_;\n \tstd::string model_;\n \tunsigned int version_;\n+\tunsigned int hwRevision_;\n \n \tint fd_;\n \tbool valid_;\ndiff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp\nindex 8987de12..3c8ccd81 100644\n--- a/src/libcamera/media_device.cpp\n+++ b/src/libcamera/media_device.cpp\n@@ -231,6 +231,7 @@ int MediaDevice::populate()\n \tdriver_ = info.driver;\n \tmodel_ = info.model;\n \tversion_ = info.media_version;\n+\thwRevision_ = info.hw_revision;\n \n \t/*\n \t * Keep calling G_TOPOLOGY until the version number stays stable.\n@@ -323,6 +324,15 @@ done:\n  * \\return The MediaDevice API version\n  */\n \n+/**\n+ * \\fn MediaDevice::hwRevision()\n+ * \\brief Retrieve the media device hardware revision\n+ *\n+ * The hardware revision is in a driver-specific format.\n+ *\n+ * \\return The MediaDevice API hardware revision\n+ */\n+\n /**\n  * \\fn MediaDevice::entities()\n  * \\brief Retrieve the list of entities in the media graph\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "1/3"
    ]
}