Show a patch.

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

{
    "id": 23590,
    "url": "https://patchwork.libcamera.org/api/patches/23590/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23590/",
    "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": "<20250617082956.5699-8-david.plowman@raspberrypi.com>",
    "date": "2025-06-17T08:29:55",
    "name": "[7/7] ipa: rpi: agc: Remove digital gain from AgcPrepareStatus",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "3515b8dfeae9b4413d46b6d6a22d1e395f636acc",
    "submitter": {
        "id": 42,
        "url": "https://patchwork.libcamera.org/api/people/42/?format=api",
        "name": "David Plowman",
        "email": "david.plowman@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23590/mbox/",
    "series": [
        {
            "id": 5225,
            "url": "https://patchwork.libcamera.org/api/series/5225/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5225",
            "date": "2025-06-17T08:29:48",
            "name": "Raspberry Pi AEC/AGC update",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5225/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23590/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23590/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 1B7B4C3240\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Jun 2025 08:30:20 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C762D68DDF;\n\tTue, 17 Jun 2025 10:30:16 +0200 (CEST)",
            "from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com\n\t[IPv6:2a00:1450:4864:20::42c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 20DCB68DD9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Jun 2025 10:30:07 +0200 (CEST)",
            "by mail-wr1-x42c.google.com with SMTP id\n\tffacd0b85a97d-3a507e88b0aso5246176f8f.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Jun 2025 01:30:07 -0700 (PDT)",
            "from raspberrypi.pitowers.org\n\t([2a00:1098:3142:1f:ffc9:aff6:7f7f:893b])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4532e259108sm166062955e9.32.2025.06.17.01.30.05\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 17 Jun 2025 01:30:05 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"hNA+atFZ\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1750149006; x=1750753806;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=RmFQZIIJ4r2zWdK/Ht3tViSq/HztBUjjfdDbZYNWKY8=;\n\tb=hNA+atFZo9dWRNLyayg0hRIP+BhyO0XN3fzcRQXcasJNpyKjDwWR66AiirZJP9odma\n\tQRK0RugdP1EckW5WLbd+UM93LVm0FbVL2H5nNCxDy0Tq7rYdkmjerD4W2aPacZvwqFsE\n\tIEW4PNSEHa3WHcdJi2dDLiZO/00Iliss5/PPBqpQR4xW1xZ15OBLn+YxSAbgm+WdJktx\n\tY8R546PVsyTy3P1FHSen9JLtzvwrlOekERzo85BQ7D2dHAy0L0sm+G+txrbjZ8VAjmsy\n\tS+TmniTs6nttFvwcvl2FKBQoIxSNfanBm5o/RMFN9multZ9r3UKIwviTmZu+W3rYAFRu\n\tUuwg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1750149006; x=1750753806;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=RmFQZIIJ4r2zWdK/Ht3tViSq/HztBUjjfdDbZYNWKY8=;\n\tb=TkhF2BTjBehCbBCnbfuI9Z6xeVQuBP5GiYpqC5mV6fyy0GIflCBCbcRZ49GwbsWgH6\n\tSXjpbitnexfa0qdNp5koVH2+/N10f+Yo6aYt1dVtMIgTpXtnwPaBVT8lPSM2vufNOIFm\n\tgP1KHIbJjgjwtbxZbm6H4PGyujsk88Fp9OH/FP/VeU4BWZHEiZiZ1GUpMNQvp2DABqYy\n\tX0eRwvYhQIuw9e3Czvejl4W6tYz4vLJ5loNjtGzSszBJ4QaGCuMN6ohIIECNkEJv2uR0\n\tYaH/zJwTRu3nc2d+Vq3H/Z0Hlrn54ONfhnesjImsmPQuGB7v2LavxHwk6DjNz3xlsPtf\n\twSnQ==",
        "X-Gm-Message-State": "AOJu0YxqCkqy4h0a640GqTjfqdLLHFAjCM+8Ug5bwr091csF4a8BrcRG\n\t2xFFjRTzoDNyr+oBZVDCgCKM2QpB/7lzZdyHt84cOaDKh797dd8JRij4h6t8YIM65wWFRUTSaRn\n\tl3Bac",
        "X-Gm-Gg": "ASbGncvEkclLpRI+tuMPxdG6VSWWVsB0mIhceasoANj3qzXl20enO9qDjp9YTpltu4K\n\tmKwQ1SeCeeAEaAqUMWAzyCPkopjWeMUH/GJLC5ypXm1SbuyGsRpcn/0oz7QYohLSo8kW1/YeUGZ\n\tlzHwqIVeVNyeryEWzjcEBiZTm4/1htrZ0H1IGTzxkFj/DmOPDr/bYO+cYK+nvEnZvsQJfJFnveK\n\t4F/wNgZEFF54ERmeKgakS++Hs7hmC4c1kJ9ZMSsF+qCZ6B8bt/JbDfBYI7QqKnfHCTTVj26wvRc\n\taMPeNefHlKaM84Dv2gJXut6h/Fav3jHLAvKbYylNupS4k7TyPmauOhATPN84BhMerh7IT+v7Ig4\n\tyGe+OuV/oj0v0I3KJUr9zs4Km1+L6",
        "X-Google-Smtp-Source": "AGHT+IFrO5mBRrM1IUOseMLdFE6KIW3wUVI7DRxTXvrlPXfHi+s0M0q75G51enhu2vF5Qr4d/RvPfg==",
        "X-Received": "by 2002:a05:6000:250c:b0:399:6dd9:9f40 with SMTP id\n\tffacd0b85a97d-3a5723678b8mr11869437f8f.9.1750149006242; \n\tTue, 17 Jun 2025 01:30:06 -0700 (PDT)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "David Plowman <david.plowman@raspberrypi.com>",
        "Subject": "[PATCH 7/7] ipa: rpi: agc: Remove digital gain from AgcPrepareStatus",
        "Date": "Tue, 17 Jun 2025 09:29:55 +0100",
        "Message-Id": "<20250617082956.5699-8-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.39.5",
        "In-Reply-To": "<20250617082956.5699-1-david.plowman@raspberrypi.com>",
        "References": "<20250617082956.5699-1-david.plowman@raspberrypi.com>",
        "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": "All platforms are now using the digital gain from the AgcStatus, so\nthe AgcPrepareStatus and prepare() methods can be tidied up.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/ipa/rpi/controller/agc_status.h        |  1 -\n src/ipa/rpi/controller/rpi/agc_channel.cpp | 18 +-----------------\n 2 files changed, 1 insertion(+), 18 deletions(-)",
    "diff": "diff --git a/src/ipa/rpi/controller/agc_status.h b/src/ipa/rpi/controller/agc_status.h\nindex 956d6abf..1ae069f2 100644\n--- a/src/ipa/rpi/controller/agc_status.h\n+++ b/src/ipa/rpi/controller/agc_status.h\n@@ -44,6 +44,5 @@ struct AgcStatus {\n };\n \n struct AgcPrepareStatus {\n-\tdouble digitalGain;\n \tint locked;\n };\ndiff --git a/src/ipa/rpi/controller/rpi/agc_channel.cpp b/src/ipa/rpi/controller/rpi/agc_channel.cpp\nindex 3829534c..acc67b71 100644\n--- a/src/ipa/rpi/controller/rpi/agc_channel.cpp\n+++ b/src/ipa/rpi/controller/rpi/agc_channel.cpp\n@@ -480,26 +480,10 @@ void AgcChannel::prepare(Metadata *imageMetadata)\n \tAgcPrepareStatus prepareStatus;\n \n \tprepareStatus.locked = false;\n-\tprepareStatus.digitalGain = 1.0;\n \n-\tif (!imageMetadata->get(\"device.status\", deviceStatus)) {\n+\tif (!imageMetadata->get(\"device.status\", deviceStatus))\n \t\tprepareStatus.locked = updateLockStatus(deviceStatus);\n \n-\t\t/*\n-\t\t * For now, the IPA code is still expecting the digital gain to come back in\n-\t\t * the prepare_status. To keep things happy, we'll just fill in the value that\n-\t\t * we calculated previously and put in the AgcStatus (which comes back as the\n-\t\t * \"delayed\" status). Once the rest of the IPA code is updated, we'll be able\n-\t\t * to remove this, and indeed remove the digitalGain from the AgcPrepareStatus.\n-\t\t */\n-\t\tAgcStatus delayedStatus;\n-\t\tif (!imageMetadata->get(\"agc.delayed_status\", delayedStatus))\n-\t\t\tprepareStatus.digitalGain = delayedStatus.digitalGain;\n-\t\telse\n-\t\t\t/* After a mode switch, this must be correct until new values come through. */\n-\t\t\tprepareStatus.digitalGain = status_.digitalGain;\n-\t}\n-\n \timageMetadata->set(\"agc.prepare_status\", prepareStatus);\n }\n \n",
    "prefixes": [
        "7/7"
    ]
}