Show a patch.

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

{
    "id": 25620,
    "url": "https://patchwork.libcamera.org/api/patches/25620/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25620/",
    "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": "<20260105-softisp-agc-v1-1-77626505853a@mainlining.org>",
    "date": "2026-01-05T08:11:12",
    "name": "ipa: simple: agc: prevent gain decrease deadloop",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "a40349376e30abfdbc07e2681b79e04383a2e6e2",
    "submitter": {
        "id": 255,
        "url": "https://patchwork.libcamera.org/api/people/255/?format=api",
        "name": "Vasiliy Doylov",
        "email": "nekocwd@mainlining.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25620/mbox/",
    "series": [
        {
            "id": 5679,
            "url": "https://patchwork.libcamera.org/api/series/5679/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5679",
            "date": "2026-01-05T08:11:12",
            "name": "ipa: simple: agc: prevent gain decrease deadloop",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5679/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25620/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25620/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 2604CBDCC0\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  5 Jan 2026 08:34:19 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5E8A061F9F;\n\tMon,  5 Jan 2026 09:34:18 +0100 (CET)",
            "from mail.mainlining.org (mail.mainlining.org [5.75.144.95])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DFDBD61F84\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Jan 2026 09:11:13 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=mainlining.org header.i=@mainlining.org\n\theader.b=\"SrMZMMiN\"; \n\tdkim=permerror (0-bit key) header.d=mainlining.org\n\theader.i=@mainlining.org header.b=\"PVqSXQx7\"; \n\tdkim-atps=neutral",
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; s=202507r; d=mainlining.org;\n\tc=relaxed/relaxed; \n\th=To:Message-Id:Subject:Date:From; t=1767600673;\n\tbh=L+lKEHEW1bWryUTiuH2/d2U nUgaxKQe5BTZq+BH7dtY=;\n\tb=SrMZMMiNu1sOkBkXG7he1XtDeVvkiuiSMjo4v92vVeGucGoLnd\n\tscXKOEnyJPvv3nWMu6CzgiPH9GeJGXkOoVZotd11uWKLpG8Q/EQPLCqsyDsLmyVAjJ6L+8xHVJh\n\tnAnCVchHriblYJKCnj6l6mBjRgYwsYkrAnpemjkHOlKhAmhaQqXZtynuBbJ4ApN4W4bBWiDd/Wn\n\tcEqgonuGWXsI5idyMuIBHf09LLIA80AfKzTxJwWljvsFsDPQSIlAai4dUb+R15cug+FUUJqdLi+\n\toqK46La09cHrscq4fITG7Ixx6/zMwKD/z/QaNUMBBbhnJ9Y5bcVGKd4ym+t14oloBvQ==;",
            "v=1; a=ed25519-sha256; s=202507e; d=mainlining.org;\n\tc=relaxed/relaxed; \n\th=To:Message-Id:Subject:Date:From; t=1767600673;\n\tbh=L+lKEHEW1bWryUTiuH2/d2U nUgaxKQe5BTZq+BH7dtY=;\n\tb=PVqSXQx7B85aVN80gz1PcX6P8t4KVKzP24IQLTNnmK7US9Jq/7\n\t2uB9ofMH0WVd6Hgi3ZIKKEpqQCY5IapxqhBw==;"
        ],
        "From": "Vasiliy Doylov <nekocwd@mainlining.org>",
        "Date": "Mon, 05 Jan 2026 11:11:12 +0300",
        "Subject": "[PATCH] ipa: simple: agc: prevent gain decrease deadloop",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260105-softisp-agc-v1-1-77626505853a@mainlining.org>",
        "X-B4-Tracking": "v=1; b=H4sIAB9yW2kC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE\n\tvPSU3UzU4B8JSMDIzMDQwNT3eL8tJLM4gLdxPRkXUOzFAPD5CTjlEQTSyWgjoKi1LTMCrBp0bG\n\t1tQAAAAAAXQAAAA==",
        "X-Change-ID": "20260105-softisp-agc-16d01cb3da49",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Vasiliy Doylov <nekocwd@mainlining.org>",
        "X-Mailer": "b4 0.14.3",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=1313;\n\ti=nekocwd@mainlining.org; h=from:subject:message-id;\n\tbh=qMmxblVcyMbnB9lQ1Iw4JK9meioBorpHjcBtaVPk9SI=;\n\tb=owGbwMvMwCXGd//xporA/cmMp9WSGDKjixTZjxSxPzt04qN1UtABJmeW7A0J3Yw1U35Ux4Qcy\n\tX7+6XdFRykLgxgXg6yYIst/w0VyB24oe9blpj6DmcPKBDKEgYtTACYy6SLD/xyxd6/Fi88f9kn0\n\tj7KPaf/Vq7Nno5tw6EbLd9Ovqiq+/MXIcGHp5zD5i+znpi0Rds7hU/7Xuj8r3ameu6yFTSu+XVu\n\tNAwA=",
        "X-Developer-Key": "i=nekocwd@mainlining.org; a=openpgp;\n\tfpr=FF31A21EC0D823497E6D65E60EDFE3B27851BF63",
        "X-Mailman-Approved-At": "Mon, 05 Jan 2026 09:34:17 +0100",
        "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": "If camera sensor helper is not set, again10 will be 0.\nIt will prevent exposure change, because again will be clamped to againMin\nand condition again > again10 will always be true.\nExposure decrease change will never occur.\nFixed by adding again > againMin check.\n\nSigned-off-by: Vasiliy Doylov <nekocwd@mainlining.org>\n---\n src/ipa/simple/algorithms/agc.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\n\n---\nbase-commit: 2861817f09c96a0660b88783eff159631e42030f\nchange-id: 20260105-softisp-agc-16d01cb3da49\n\nBest regards,",
    "diff": "diff --git a/src/ipa/simple/algorithms/agc.cpp b/src/ipa/simple/algorithms/agc.cpp\nindex 189de770..2972844b 100644\n--- a/src/ipa/simple/algorithms/agc.cpp\n+++ b/src/ipa/simple/algorithms/agc.cpp\n@@ -71,7 +71,8 @@ void Agc::updateExposure(IPAContext &context, IPAFrameContext &frameContext, dou\n \t}\n \n \tif (exposureMSV > kExposureOptimal + kExposureSatisfactory) {\n-\t\tif (again > context.configuration.agc.again10) {\n+\t\tif (again > context.configuration.agc.again10 &&\n+\t\t    again > context.configuration.agc.againMin) {\n \t\t\tdouble next = again * kExpNumeratorDown / kExpDenominator;\n \t\t\tif (again - next < context.configuration.agc.againMinStep)\n \t\t\t\tagain -= context.configuration.agc.againMinStep;\n",
    "prefixes": []
}