Show a patch.

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

{
    "id": 23505,
    "url": "https://patchwork.libcamera.org/api/patches/23505/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23505/",
    "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": "<20250609151624.278754-1-barnabas.pocze@ideasonboard.com>",
    "date": "2025-06-09T15:16:24",
    "name": "[v1] ipa: rpi: Initialize enum controls with a list of values",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "33803ecdf392e51d94289b73fe9c4b2dab3f8b60",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23505/mbox/",
    "series": [
        {
            "id": 5211,
            "url": "https://patchwork.libcamera.org/api/series/5211/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5211",
            "date": "2025-06-09T15:16:24",
            "name": "[v1] ipa: rpi: Initialize enum controls with a list of values",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5211/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23505/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23505/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 6AE6CC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 Jun 2025 15:16:30 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5C0FD68DBD;\n\tMon,  9 Jun 2025 17:16:29 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EB66E68DAB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Jun 2025 17:16:27 +0200 (CEST)",
            "from pb-laptop.local (185.221.142.30.nat.pool.zt.hu\n\t[185.221.142.30])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 245A07F0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Jun 2025 17:16:21 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Dxy5/r70\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1749482181;\n\tbh=YdzzopMXCOMxjxWg69oYniOW4geK6XwvuV4DqRXNDqY=;\n\th=From:To:Subject:Date:From;\n\tb=Dxy5/r70OmjAV12nN9fdJEHO9JE02evgpaGfctEB87bbPCaHCX78wXPZuvt8mBC1m\n\tiZMdS6wnpF3W9NLDbBJCXMCPXA7Z727ktrYaVCyioVQUeqAoWlYHKpn1BV/nsM2BdX\n\tOOvZs5eR5jUOQpFHokqMrQ/eYqPgst/o74W+pOZg=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH v1] ipa: rpi: Initialize enum controls with a list of values",
        "Date": "Mon,  9 Jun 2025 17:16:24 +0200",
        "Message-ID": "<20250609151624.278754-1-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.49.0",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "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": "This is how uvcvideo and rkisp1 do it. See ee918b370a08b\n(\"ipa: rkisp1: agc: Initialize enum controls with a list of values\")\nfor the motivation. In summary, having a list of values is used as a sign\nthat the control is an enum in multiple places (e.g. `cam`, `camshark`).\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n src/ipa/rpi/common/ipa_base.cpp | 16 +++++-----------\n 1 file changed, 5 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex e0f8b7e78..39e2db86e 100644\n--- a/src/ipa/rpi/common/ipa_base.cpp\n+++ b/src/ipa/rpi/common/ipa_base.cpp\n@@ -57,24 +57,18 @@ constexpr Duration controllerMinFrameDuration = 1.0s / 30.0;\n const ControlInfoMap::Map ipaControls{\n \t/* \\todo Move this to the Camera class */\n \t{ &controls::AeEnable, ControlInfo(false, true, true) },\n-\t{ &controls::ExposureTimeMode,\n-\t  ControlInfo(static_cast<int32_t>(controls::ExposureTimeModeAuto),\n-\t\t      static_cast<int32_t>(controls::ExposureTimeModeManual),\n-\t\t      static_cast<int32_t>(controls::ExposureTimeModeAuto)) },\n+\t{ &controls::ExposureTimeMode, ControlInfo(controls::ExposureTimeModeValues) },\n \t{ &controls::ExposureTime,\n \t  ControlInfo(1, 66666, static_cast<int32_t>(defaultExposureTime.get<std::micro>())) },\n-\t{ &controls::AnalogueGainMode,\n-\t  ControlInfo(static_cast<int32_t>(controls::AnalogueGainModeAuto),\n-\t\t      static_cast<int32_t>(controls::AnalogueGainModeManual),\n-\t\t      static_cast<int32_t>(controls::AnalogueGainModeAuto)) },\n+\t{ &controls::AnalogueGainMode, ControlInfo(controls::AnalogueGainModeValues) },\n \t{ &controls::AnalogueGain, ControlInfo(1.0f, 16.0f, 1.0f) },\n \t{ &controls::AeMeteringMode, ControlInfo(controls::AeMeteringModeValues) },\n \t{ &controls::AeConstraintMode, ControlInfo(controls::AeConstraintModeValues) },\n \t{ &controls::AeExposureMode, ControlInfo(controls::AeExposureModeValues) },\n \t{ &controls::ExposureValue, ControlInfo(-8.0f, 8.0f, 0.0f) },\n-\t{ &controls::AeFlickerMode, ControlInfo(static_cast<int>(controls::FlickerOff),\n-\t\t\t\t\t\tstatic_cast<int>(controls::FlickerManual),\n-\t\t\t\t\t\tstatic_cast<int>(controls::FlickerOff)) },\n+\t{ &controls::AeFlickerMode,\n+\t  ControlInfo({ { ControlValue(controls::FlickerOff), ControlValue(controls::FlickerManual) } },\n+\t\t      controls::FlickerOff) },\n \t{ &controls::AeFlickerPeriod, ControlInfo(100, 1000000) },\n \t{ &controls::Brightness, ControlInfo(-1.0f, 1.0f, 0.0f) },\n \t{ &controls::Contrast, ControlInfo(0.0f, 32.0f, 1.0f) },\n",
    "prefixes": [
        "v1"
    ]
}