Patch Detail
Show a patch.
GET /api/1.1/patches/23866/?format=api
{ "id": 23866, "url": "https://patchwork.libcamera.org/api/1.1/patches/23866/?format=api", "web_url": "https://patchwork.libcamera.org/patch/23866/", "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": "<20250721074853.1463358-8-naush@raspberrypi.com>", "date": "2025-07-21T07:47:27", "name": "[v2,7/7] ipa: rpi: agc: Remove digital gain from AgcPrepareStatus", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "3515b8dfeae9b4413d46b6d6a22d1e395f636acc", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/23866/mbox/", "series": [ { "id": 5303, "url": "https://patchwork.libcamera.org/api/1.1/series/5303/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5303", "date": "2025-07-21T07:47:20", "name": "Raspberry Pi AEC/AGC update", "version": 2, "mbox": "https://patchwork.libcamera.org/series/5303/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/23866/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/23866/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 F3BD9C3323\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 21 Jul 2025 07:49:12 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DE24868FE1;\n\tMon, 21 Jul 2025 09:49:11 +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 3F08868FD1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Jul 2025 09:49:00 +0200 (CEST)", "by mail-wr1-x42c.google.com with SMTP id\n\tffacd0b85a97d-3a4e749d7b2so660866f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Jul 2025 00:49:00 -0700 (PDT)", "from NAUSH-P-DELL.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4562e802afasm151101765e9.12.2025.07.21.00.48.59\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 21 Jul 2025 00:48:59 -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=\"RvU4LSMX\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1753084139; x=1753688939;\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=yCqWjxhzUe3uZSUifzeDiS7Du7OgdYFrmNRNGtduVSU=;\n\tb=RvU4LSMXHxQwp1YcW0K7d2gjQTCvuaDEEskQ8D5EkkxFOO93j0OtuxanIAoaFw0d21\n\t+W8hQqUq3t8WEnExgW3CWaOQhWjORQk5UB8X5HUBoPT6cKy0RK+7y0Zu86uCckPesP6e\n\t8kR9wcGIrFU+KKVqWBLvByXwqd75qv2tjO7+b8MiV9trCUehO9z8Gc1aohUdt9ObELaq\n\tTml3ML88NbQ9gjQ5+FxJvxFKJXV6E27Ybkg609DWd5HrQD7yzUk1Xj8qvFecbNx+0BI4\n\tSjTsrzT94gCTULC9XcCzN60WwKlQCdAaWn9PDpHp4CufvhyBnd7VpHyzXa00OG1zw+l5\n\twDLA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1753084139; x=1753688939;\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=yCqWjxhzUe3uZSUifzeDiS7Du7OgdYFrmNRNGtduVSU=;\n\tb=iutCqxsxrgablf+25ALnsV51eloWAJVgXYHSBbNIY7iPiO/+ZRZUlyoGtdnUVVt+NV\n\tixRMcVG3mdXipsuniad/A4BW2lPNkZxuBwSHas1goFKoFkJV2w+qBzOgr5GS/6NuIqeA\n\tJ+cyDSW382qGzExXVvU//Suwi0VKKK/uIvXV8ElnC47+zT2yk5WT4E/KTQrP/Bf7NYgp\n\tHX0UegzqghGaLauCTVFN3UZtFAyk9WhAsvKJQKjlq1Awdtr1FOCsPuPES4Qbgmp/xu7Q\n\thTBjb0MS06VBxEduT3FVWTzCJTLtu9o/T1BbZ0gJ4jwF/oj5qOYMwKOFcBI5/NxRWjDj\n\tUFoA==", "X-Gm-Message-State": "AOJu0YxekZf4jHM5q7tAKiujcaAbuxNrx3ddRWDXpQZJjzo6T+lmKdrb\n\tyKvCni+3u5ItMr8XSteaiEQZ4xL8W4Pscek3gYlorWEW3zynWH2Yp/jBtNzBeKFFTSGD3HhQwxL\n\tedBhKK4U=", "X-Gm-Gg": "ASbGncu04ppl+wVSWzXC7ThDHTNbwKeeh5QAHt5gPOKjwngQ3HVrxjvvwrrKvzx/Ay3\n\t/Oh0c8gw4nM0Ptg5BVwxnPpYpsuKo06xaFKYz5aan6zE6/05saaUwrglHoAtsm5X+DrMJI82izR\n\tUUZy7hk0o2G8QhFVqnLxvpd506rGdMzZ8GdSJqIj1ytmkqMkouRpBh7LlMpHLmhQSrAng53zyfu\n\tUj1JDjPK2TUQaAHtmfno4BICz2+pdGuJqmYOk0SnwmGy/hOYERtqqrUpQkmFpT14dNRwvXEsL8i\n\tmXI9L+nvICpLRWja4oVpMoFQ+mbCKJQyiw9xY7ANIqiaZk7ZaLQLGVbTDXEd5B4tCyDf1fP6Qxt\n\tm8eiteQqM8A+Kzwvcbl62eRV6uf3llKIJUo+NvEgSVw==", "X-Google-Smtp-Source": "AGHT+IHFvQrr5G0b0Ek2oDufRoXndAb4rhnfIcSZTooXgba9jnsdFbTpa4uIcb/wX7rTa62IJt6wQA==", "X-Received": "by 2002:a05:6000:40c7:b0:3b6:18c4:e5af with SMTP id\n\tffacd0b85a97d-3b618c4e70bmr4213953f8f.10.1753084139480; \n\tMon, 21 Jul 2025 00:48:59 -0700 (PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "David Plowman <david.plowman@raspberrypi.com>,\n\tNaushir Patuck <naush@raspberrypi.com>", "Subject": "[PATCH v2 7/7] ipa: rpi: agc: Remove digital gain from\n\tAgcPrepareStatus", "Date": "Mon, 21 Jul 2025 08:47:27 +0100", "Message-ID": "<20250721074853.1463358-8-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20250721074853.1463358-1-naush@raspberrypi.com>", "References": "<20250721074853.1463358-1-naush@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": "From: David Plowman <david.plowman@raspberrypi.com>\n\nAll 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>\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Naushir Patuck <naush@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 956d6abf398c..1ae069f2ee8a 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 7da1c6dbbec7..cc944e6dd54e 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": [ "v2", "7/7" ] }