Show a patch.

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

{
    "id": 16383,
    "url": "https://patchwork.libcamera.org/api/patches/16383/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16383/",
    "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": "<20220627162732.33160-3-jacopo@jmondi.org>",
    "date": "2022-06-27T16:27:19",
    "name": "[libcamera-devel,02/15] libcamera: control_ids: Separate the id numerical space",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "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/16383/mbox/",
    "series": [
        {
            "id": 3224,
            "url": "https://patchwork.libcamera.org/api/series/3224/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3224",
            "date": "2022-06-27T16:27:17",
            "name": "Internal controls, sensor delays and IPA init/configure rework",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3224/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16383/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16383/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 C9E67BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jun 2022 16:27:45 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D73E665642;\n\tMon, 27 Jun 2022 18:27:44 +0200 (CEST)",
            "from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C074D6059B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jun 2022 18:27:41 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id BA89B20008;\n\tMon, 27 Jun 2022 16:27:40 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656347265;\n\tbh=Td3krTJJg9DQJdNUDwUHGq6oqQPqRHLo3sYlLNOUw9g=;\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=lmewknPpO/cGzbCO/pmH4z2+tk+iuZdD1x1EflR1zXtbfRoSctjDg8SLukQ9ZkxBI\n\t3FYbKg1xCOJA8UT9t/oquDEjw/WtA6AxBtxeLGFFxvjINyCZsVh1TT9FdfdH/oDiFG\n\tbFqvnqXfi922FlkH2ijZ1F53tgbAnmBGMVZMJmUwgDRX8PhZX3RkT5Z/5c6tjdjx91\n\tXroa9oqaKpAxPLnOpY7EK/vPv1u6AyoxbHXjenzfW6xvqCsEIsnmkHmxCSi8YQyrlx\n\tKdDceKtHsqiSRSNfCuut/FY5ehsMQ2QwsZLXXCm5W7S8mqFCZmeKbfK3BmCyt/nrTh\n\t/R7YbJId67oEw==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 27 Jun 2022 18:27:19 +0200",
        "Message-Id": "<20220627162732.33160-3-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.36.1",
        "In-Reply-To": "<20220627162732.33160-1-jacopo@jmondi.org>",
        "References": "<20220627162732.33160-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 02/15] libcamera: control_ids: Separate\n\tthe id 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>\nReviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.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",
        "02/15"
    ]
}