Show a patch.

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

{
    "id": 16300,
    "url": "https://patchwork.libcamera.org/api/patches/16300/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16300/",
    "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": "<20220621150337.47839-3-jacopo@jmondi.org>",
    "date": "2022-06-21T15:03:36",
    "name": "[libcamera-devel,2/3] libcamera: control_ids: Separate the id numerical space",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "84be64945b27805dd06cb11102d7f4594df6a71f",
    "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/16300/mbox/",
    "series": [
        {
            "id": 3198,
            "url": "https://patchwork.libcamera.org/api/series/3198/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3198",
            "date": "2022-06-21T15:03:34",
            "name": "libcamera: Introduce internal controls",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3198/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16300/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16300/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 87F9DBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Jun 2022 15:03:50 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DE0B565632;\n\tTue, 21 Jun 2022 17:03:49 +0200 (CEST)",
            "from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net\n\t[217.70.183.199])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5F66C65632\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Jun 2022 17:03:46 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id A5E6AFF80C;\n\tTue, 21 Jun 2022 15:03:45 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1655823830;\n\tbh=UvxTsubqWRotqxl+cjyqObqjTaPXbtT+WfVYLYjWIjg=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=PAlnz+rN8mX7a2aU7PweDAB+lvnrsVXIEGm66WYDzRCcwQit7Z8xMZzjYDwcW44rK\n\tRiPxN0hu+FwqZvue8OLmq97n5Cw5puJV12FeGEwqj3kJqjGMmofTcgx8aGVKzwWyYP\n\tyGxtdiod1QNhueRkgMSH9f89Do7uQQ//P71OLSozgMGCkOVuhmFuRa/TF1d1ZBzMVm\n\tqFb1Ihlsnk0YW2Ei68tRbY/6PLKU1jCWI/GJ98+/sM9vytxiiTD0jxnjdSbJX3T5W0\n\tnzG1mX3sGV3uFmSNtXqh+pC/l6FnpmBBHgsb574WjnC2TPGWbspChooKfDfAgyqePq\n\tf2hj5MaMNa64g==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 21 Jun 2022 17:03:36 +0200",
        "Message-Id": "<20220621150337.47839-3-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.36.1",
        "In-Reply-To": "<20220621150337.47839-1-jacopo@jmondi.org>",
        "References": "<20220621150337.47839-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 2/3] libcamera: control_ids: Separate the\n\tid numerical space",
        "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>",
        "From": "Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Jacopo Mondi <jacopo@jmondi.org>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Separate the internal and public control id numerical space by\nplacing the internal controls at offset 0x1000.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n utils/gen-controls.py | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/utils/gen-controls.py b/utils/gen-controls.py\nindex 978179f63858..63e888546277 100755\n--- a/utils/gen-controls.py\n+++ b/utils/gen-controls.py\n@@ -118,7 +118,7 @@ ${description}\n     }\n \n \n-def generate_h(controls):\n+def generate_h(internal, controls):\n     enum_template_start = string.Template('''enum ${name}Enum {''')\n     enum_value_template = string.Template('''\\t${name} = ${value},''')\n     enum_values_template = string.Template('''extern const std::array<const ControlValue, ${size}> ${name}Values;''')\n@@ -133,7 +133,11 @@ def generate_h(controls):\n         name, ctrl = ctrl.popitem()\n         id_name = snake_case(name).upper()\n \n-        ids.append('\\t' + id_name + ' = ' + str(id_value) + ',')\n+        # Separate the internal and public controls id space\n+        if internal:\n+            ids.append('\\t' + id_name + ' = ' + \"0x1000 | \" + str(id_value) + ',')\n+        else:\n+            ids.append('\\t' + id_name + ' = ' + str(id_value) + ',')\n \n         ctrl_type = ctrl['type']\n         if ctrl_type == 'string':\n@@ -218,7 +222,7 @@ def main(argv):\n     if args.template.endswith('.cpp.in'):\n         data = generate_cpp(controls)\n     elif args.template.endswith('.h.in'):\n-        data = generate_h(controls)\n+        data = generate_h(args.internal, controls)\n     else:\n         raise RuntimeError('Unknown template type')\n \n",
    "prefixes": [
        "libcamera-devel",
        "2/3"
    ]
}