Show a patch.

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

{
    "id": 26265,
    "url": "https://patchwork.libcamera.org/api/patches/26265/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/26265/",
    "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": "<20260306144228.1017799-1-barnabas.pocze@ideasonboard.com>",
    "date": "2026-03-06T14:42:28",
    "name": "[v1] ipa: simple: Fix `again10` value with sensor helper",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "2931119e6fd6f3ecd89fda6bc66f025de6a6c3dc",
    "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/26265/mbox/",
    "series": [
        {
            "id": 5823,
            "url": "https://patchwork.libcamera.org/api/series/5823/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5823",
            "date": "2026-03-06T14:42:28",
            "name": "[v1] ipa: simple: Fix `again10` value with sensor helper",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5823/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/26265/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/26265/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 840D5BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 Mar 2026 14:42:34 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7E8CC62620;\n\tFri,  6 Mar 2026 15:42:33 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9104D620FA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Mar 2026 15:42:31 +0100 (CET)",
            "from pb-laptop.local (185.182.214.224.nat.pool.zt.hu\n\t[185.182.214.224])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 50BD7874;\n\tFri,  6 Mar 2026 15:41:27 +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=\"i7cf4NsV\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1772808087;\n\tbh=+sQZWPUwfa/K5DzfQhEpXj8tBcoN8m9ka1BefeQEKm4=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=i7cf4NsVBitkRaCe0PWdDp7ncNxHSgdid+pVGz/yhMrEmJUT+uOcKbixBPPSrsYKL\n\tGwg1HFGe5v21ptMFVxVUX7DBD9WNaBLw8EtqFQqHA9D/agZ1P7FwQPh7ggcnpQ5Ysf\n\tjTiFA98HIjc3sw8+D+oCtUXOKOg3b3iJDMCX68zU=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Hans de Goede <johannes.goede@oss.qualcomm.com>",
        "Subject": "[PATCH v1] ipa: simple: Fix `again10` value with sensor helper",
        "Date": "Fri,  6 Mar 2026 15:42:28 +0100",
        "Message-ID": "<20260306144228.1017799-1-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.53.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": "`CameraSensorHelper::gain(uint32_t)` maps a gain code to the actual floating\npoint gain value. Calling it with `1.0` as the argument will simply get\nthe real gain for gain code 1. This is most likely not what was intended.\n\nFor example, in the case of the `ov2740` sensor, `againMin` is 1, but the\ncalculated `again10` (1 / 128 ~ 0.078) ends up being < 1, meaning that the\nagc algorithm will never lower the exposure.\n\nFix that by using the maximum of the minimum gain and 1 as `again10`.\n\nFixes: 950ca85e8aa5 (\"ipa: software_isp: AGC: Do not lower gain below 1.0\")\n---\n src/ipa/simple/soft_simple.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\n--\n2.53.0",
    "diff": "diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp\nindex c35277cfe..7d25bdd26 100644\n--- a/src/ipa/simple/soft_simple.cpp\n+++ b/src/ipa/simple/soft_simple.cpp\n@@ -227,7 +227,7 @@ int IPASoftSimple::configure(const IPAConfigInfo &configInfo)\n \tif (camHelper_) {\n \t\tcontext_.configuration.agc.againMin = camHelper_->gain(againMin);\n \t\tcontext_.configuration.agc.againMax = camHelper_->gain(againMax);\n-\t\tcontext_.configuration.agc.again10 = camHelper_->gain(1.0);\n+\t\tcontext_.configuration.agc.again10 = std::max(context_.configuration.agc.againMin, 1.0);\n \t\tcontext_.configuration.agc.againMinStep =\n \t\t\t(context_.configuration.agc.againMax -\n \t\t\t context_.configuration.agc.againMin) /\n",
    "prefixes": [
        "v1"
    ]
}