Show a patch.

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

{
    "id": 25057,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25057/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25057/",
    "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": "<20251114-exposure-limits-v3-5-b7c07feba026@ideasonboard.com>",
    "date": "2025-11-14T14:17:00",
    "name": "[v3,05/19] ipa: ipu3: Move exposure limits to sensor config",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b6bd81d7b6bf7ae730151d060cf6f3856696ace1",
    "submitter": {
        "id": 143,
        "url": "https://patchwork.libcamera.org/api/1.1/people/143/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo.mondi@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25057/mbox/",
    "series": [
        {
            "id": 5590,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5590/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5590",
            "date": "2025-11-14T14:16:55",
            "name": "libipa: agc: Calculate exposure limits",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/5590/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25057/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25057/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 49628C32DB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 14 Nov 2025 14:17:33 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6145360AC4;\n\tFri, 14 Nov 2025 15:17:26 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9A17F60A8B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 Nov 2025 15:17:19 +0100 (CET)",
            "from [192.168.1.101] (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9B03415D2;\n\tFri, 14 Nov 2025 15:15: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=\"q5Id4laL\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763129718;\n\tbh=UEBgBcx8IvVKaJmWZ6RWcsCM2RsMZRe0Q+bBBarwuno=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=q5Id4laLfh/aHHPM7Spl3cLlibC63GHpu9JzdxxSi/XlPQ2ZlQhNhPUwMBBHPqg8U\n\tWmggTAM42TGzsUbhCwyfsT1XlbbkAH9De93b+KDw/NxfxsEwL8pAVOrveDpXFH9v3l\n\tlnzPtiWdMcIL+oHjC/n7H91zAiIvobEJk/0OhTPk=",
        "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Date": "Fri, 14 Nov 2025 15:17:00 +0100",
        "Subject": "[PATCH v3 05/19] ipa: ipu3: Move exposure limits to sensor config",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20251114-exposure-limits-v3-5-b7c07feba026@ideasonboard.com>",
        "References": "<20251114-exposure-limits-v3-0-b7c07feba026@ideasonboard.com>",
        "In-Reply-To": "<20251114-exposure-limits-v3-0-b7c07feba026@ideasonboard.com>",
        "To": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>,\n\tRobert Mader <robert.mader@collabora.com>, \n\tlibcamera-devel@lists.libcamera.org",
        "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "X-Mailer": "b4 0.14.2",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=5067;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=UEBgBcx8IvVKaJmWZ6RWcsCM2RsMZRe0Q+bBBarwuno=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBpFznqe6V0YFI3EeYqDh6/dP6GMzgbuo5aFY2NQ\n\tilELLUf42WJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaRc56gAKCRByNAaPFqFW\n\tPLYfD/9ygxAjK6MYWjYhPChlkVYVXXTsQ8pafS3ayRy2uzQ+jK/26twFonMaQ/ORBJiy5shhOtx\n\tUoXgbDsvEoei/Pfx5cjqE5d5pUfwqB5L29dZzQLcsXMdXwy31WMWO53MPQPfT6p2qh7BaqpS0WJ\n\t/z4E4ST2i0LEyPKeZf2yXf+oKuIDIvOV4KhuaVJtLFU1vEhPORug2X/kiDKcWYrnB9K5j45kmGj\n\tNzdIA5DpnMyxcoT6wDWeYkni3HV/JMI0TmB4GWTBD7Br0E5KnlsKCcT/E2VrJPtOntfL/RqSjuK\n\tjoZqQb6MexiAzKOSUon4Z1rhWFJA5mE7pg2eBZaevgYln1vZgwR4fbw7rvXRl23vBSPhHT6XGT2\n\t6aT6tpIDQJLGfkVkJnlpFX3svAdVafJyFM5jNtStRH9Zl28ZcOH7d7eIeNU/LMvIMrn0Ck3wOu1\n\tKruH0I9YG+2asmJU+QpYYfFt4cu39AgEn6wf+5i+9osq4Xvp24cWij+SzkMMPTSERH4CNCZ0iHM\n\tUdVKHUUmcBLBbch5kdNteyoX6qkz2QFul+ORDA/vObGH7rYOubI0GpG2XZYG3QVefaPXZa8SH/U\n\t3rs5a+xtz+CooABFddk4dKMhAmdj8aspZZMpukCIFNRUW5ToRgyscMJQPHX2JwGaEz1QZn6x5W4\n\tUCRK7ysQccAFcpw==",
        "X-Developer-Key": "i=jacopo.mondi@ideasonboard.com; a=openpgp;\n\tfpr=72392EDC88144A65C701EA9BA5826A2587AD026B",
        "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": "Move the exposure limits (shutter time and gains) in the IPAContext\nsensor configuration and not in the 'agc' member.\n\nThis aligns the IPU3 IPA with the RkISP1 and Mali ones and will help\nunifying the handling of sensor configuration data through a common\ntype.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/ipa/ipu3/algorithms/agc.cpp |  8 ++++----\n src/ipa/ipu3/ipa_context.cpp    | 27 +++++++++++----------------\n src/ipa/ipu3/ipa_context.h      |  9 +++------\n src/ipa/ipu3/ipu3.cpp           |  8 ++++----\n 4 files changed, 22 insertions(+), 30 deletions(-)",
    "diff": "diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp\nindex b0d89541da8550bd50472779da7fa8e33b96e2f0..4574f3a1a9cd3f40b1b1402238809ee1a777946d 100644\n--- a/src/ipa/ipu3/algorithms/agc.cpp\n+++ b/src/ipa/ipu3/algorithms/agc.cpp\n@@ -101,12 +101,12 @@ int Agc::configure(IPAContext &context,\n \tstride_ = configuration.grid.stride;\n \tbdsGrid_ = configuration.grid.bdsGrid;\n \n-\tminExposureTime_ = configuration.agc.minExposureTime;\n-\tmaxExposureTime_ = std::min(configuration.agc.maxExposureTime,\n+\tminExposureTime_ = configuration.sensor.minExposureTime;\n+\tmaxExposureTime_ = std::min(configuration.sensor.maxExposureTime,\n \t\t\t\t    kMaxExposureTime);\n \n-\tminAnalogueGain_ = std::max(configuration.agc.minAnalogueGain, kMinAnalogueGain);\n-\tmaxAnalogueGain_ = configuration.agc.maxAnalogueGain;\n+\tminAnalogueGain_ = std::max(configuration.sensor.minAnalogueGain, kMinAnalogueGain);\n+\tmaxAnalogueGain_ = configuration.sensor.maxAnalogueGain;\n \n \t/* Configure the default exposure and gain. */\n \tactiveState.agc.gain = minAnalogueGain_;\ndiff --git a/src/ipa/ipu3/ipa_context.cpp b/src/ipa/ipu3/ipa_context.cpp\nindex 5d0ebaaec454fca823851228614a3eb229f0132b..47ae750f0ddb859e1a08e75e255b8decacd730a1 100644\n--- a/src/ipa/ipu3/ipa_context.cpp\n+++ b/src/ipa/ipu3/ipa_context.cpp\n@@ -96,8 +96,17 @@ namespace libcamera::ipa::ipu3 {\n  */\n \n /**\n- * \\var IPASessionConfiguration::agc\n- * \\brief AGC parameters configuration of the IPA\n+ * \\var IPASessionConfiguration::sensor\n+ * \\brief Sensor-specific configuration of the IPA\n+ *\n+ * \\var IPASessionConfiguration::sensor.lineDuration\n+ * \\brief Line duration in microseconds\n+ *\n+ * \\var IPASessionConfiguration::sensor.defVBlank\n+ * \\brief The default vblank value of the sensor\n+ *\n+ * \\var IPASessionConfiguration::sensor.size\n+ * \\brief Sensor output resolution\n  *\n  * \\var IPASessionConfiguration::agc.minExposureTime\n  * \\brief Minimum exposure time supported with the configured sensor\n@@ -112,20 +121,6 @@ namespace libcamera::ipa::ipu3 {\n  * \\brief Maximum analogue gain supported with the configured sensor\n  */\n \n-/**\n- * \\var IPASessionConfiguration::sensor\n- * \\brief Sensor-specific configuration of the IPA\n- *\n- * \\var IPASessionConfiguration::sensor.lineDuration\n- * \\brief Line duration in microseconds\n- *\n- * \\var IPASessionConfiguration::sensor.defVBlank\n- * \\brief The default vblank value of the sensor\n- *\n- * \\var IPASessionConfiguration::sensor.size\n- * \\brief Sensor output resolution\n- */\n-\n /**\n  * \\var IPAActiveState::agc\n  * \\brief Context for the Automatic Gain Control algorithm\ndiff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h\nindex 4544d663642fb6fde1cf69a32f1c0fbb2fbd98f6..baf84b8cbc9a1ff9411c0a994e35317b613580dd 100644\n--- a/src/ipa/ipu3/ipa_context.h\n+++ b/src/ipa/ipu3/ipa_context.h\n@@ -34,16 +34,13 @@ struct IPASessionConfiguration {\n \t} af;\n \n \tstruct {\n+\t\tint32_t defVBlank;\n+\t\tutils::Duration lineDuration;\n+\t\tSize size;\n \t\tutils::Duration minExposureTime;\n \t\tutils::Duration maxExposureTime;\n \t\tdouble minAnalogueGain;\n \t\tdouble maxAnalogueGain;\n-\t} agc;\n-\n-\tstruct {\n-\t\tint32_t defVBlank;\n-\t\tutils::Duration lineDuration;\n-\t\tSize size;\n \t} sensor;\n };\n \ndiff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex 36d8f0da430a3d4f94e2a3f760850519742ea992..60f22727a0f75e374b53fb6d3185946b70c25582 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -217,10 +217,10 @@ void IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls)\n \t *\n \t * \\todo take VBLANK into account for maximum exposure time\n \t */\n-\tcontext_.configuration.agc.minExposureTime = minExposure * context_.configuration.sensor.lineDuration;\n-\tcontext_.configuration.agc.maxExposureTime = maxExposure * context_.configuration.sensor.lineDuration;\n-\tcontext_.configuration.agc.minAnalogueGain = context_.camHelper->gain(minGain);\n-\tcontext_.configuration.agc.maxAnalogueGain = context_.camHelper->gain(maxGain);\n+\tcontext_.configuration.sensor.minExposureTime = minExposure * context_.configuration.sensor.lineDuration;\n+\tcontext_.configuration.sensor.maxExposureTime = maxExposure * context_.configuration.sensor.lineDuration;\n+\tcontext_.configuration.sensor.minAnalogueGain = context_.camHelper->gain(minGain);\n+\tcontext_.configuration.sensor.maxAnalogueGain = context_.camHelper->gain(maxGain);\n }\n \n /**\n",
    "prefixes": [
        "v3",
        "05/19"
    ]
}