Show a patch.

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

{
    "id": 22633,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/22633/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22633/",
    "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": "<20250123120918.86780-1-stefan.klug@ideasonboard.com>",
    "date": "2025-01-23T12:09:14",
    "name": "[RFC] ipa: rkisp1: agc: Initialize enum controls with a list of values",
    "commit_ref": "ee918b370a08b362de75ee590cfc46fe8e38a0f0",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "7be9cfcfe5948e60ebf0326e4184b1639ddf01e2",
    "submitter": {
        "id": 184,
        "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api",
        "name": "Stefan Klug",
        "email": "stefan.klug@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22633/mbox/",
    "series": [
        {
            "id": 4967,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4967/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4967",
            "date": "2025-01-23T12:09:14",
            "name": "[RFC] ipa: rkisp1: agc: Initialize enum controls with a list of values",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4967/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22633/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22633/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 48B50C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 23 Jan 2025 12:09:24 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8C6596855F;\n\tThu, 23 Jan 2025 13:09:23 +0100 (CET)",
            "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 3ACD461878\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 Jan 2025 13:09:22 +0100 (CET)",
            "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:c0a:33cd:b453:5d3f])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8F611465;\n\tThu, 23 Jan 2025 13:08:18 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"gSf7n2yZ\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1737634098;\n\tbh=4HgAWBMYl79OOa6CYIs/yxuW6WaW3lTsDCD7FaT8P+E=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=gSf7n2yZMIa5+CnTmJoY3meVFpcB409bQPH5dBiU5ZMXbkyYYk2VSoosKRxH/nXWX\n\tNk3n/oOdTOePijAAnAaYMC3eIZlgud2tZFWjhtnv7M4CdRDkHQcRhFGhEh3lW4qkf9\n\tXK0WPgVAgh4J7Nm8VeOc14cZD5dsIy4erNqTlIJI=",
        "From": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "Subject": "[RFC PATCH] ipa: rkisp1: agc: Initialize enum controls with a list\n\tof values",
        "Date": "Thu, 23 Jan 2025 13:09:14 +0100",
        "Message-ID": "<20250123120918.86780-1-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The controls ExposureTimeMode and AnalogueGainMode are shown in camshark\nas normal int entries instead of enum popups. The reason is that\nControlInfos for these controls are constructed using min/max instead\nof a list of valid ControlValues. Camshark uses the values() vector to\ndeduce if the control is an enum or not. It might be debatable if this\nis the correct check, but all other ControlInfos for enum controls in\nlibcamera are initialized using a list.\n\nModify the construction of the ControlInfos to use the Span based\nconstructor to fix that issue.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n src/ipa/rkisp1/algorithms/agc.cpp | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\nindex 1680669c6875..e7c6de757593 100644\n--- a/src/ipa/rkisp1/algorithms/agc.cpp\n+++ b/src/ipa/rkisp1/algorithms/agc.cpp\n@@ -149,13 +149,13 @@ int Agc::init(IPAContext &context, const YamlObject &tuningData)\n \t\treturn ret;\n \n \tcontext.ctrlMap[&controls::ExposureTimeMode] =\n-\t\tControlInfo(static_cast<int32_t>(controls::ExposureTimeModeAuto),\n-\t\t\t    static_cast<int32_t>(controls::ExposureTimeModeManual),\n-\t\t\t    static_cast<int32_t>(controls::ExposureTimeModeAuto));\n+\t\tControlInfo({ { ControlValue(controls::ExposureTimeModeAuto),\n+\t\t\t\tControlValue(controls::ExposureTimeModeManual) } },\n+\t\t\t    controls::ExposureTimeModeAuto);\n \tcontext.ctrlMap[&controls::AnalogueGainMode] =\n-\t\tControlInfo(static_cast<int32_t>(controls::AnalogueGainModeAuto),\n-\t\t\t    static_cast<int32_t>(controls::AnalogueGainModeManual),\n-\t\t\t    static_cast<int32_t>(controls::AnalogueGainModeAuto));\n+\t\tControlInfo({ { ControlValue(controls::AnalogueGainModeAuto),\n+\t\t\t\tControlValue(controls::AnalogueGainModeManual) } },\n+\t\t\t    controls::AnalogueGainModeAuto);\n \t/* \\todo Move this to the Camera class */\n \tcontext.ctrlMap[&controls::AeEnable] = ControlInfo(false, true, true);\n \tcontext.ctrlMap.merge(controls());\n",
    "prefixes": [
        "RFC"
    ]
}