Patch Detail
Show a patch.
GET /api/patches/22447/?format=api
{ "id": 22447, "url": "https://patchwork.libcamera.org/api/patches/22447/?format=api", "web_url": "https://patchwork.libcamera.org/patch/22447/", "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": "<20241220162724.756494-8-stefan.klug@ideasonboard.com>", "date": "2024-12-20T16:26:53", "name": "[RFC,7/7] ipa: rkisp1: Set frameContext.agc in queueRequest for auto mode also", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "bedf363257bb51e53db8ee585f1cbeab50169f4e", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/22447/mbox/", "series": [ { "id": 4925, "url": "https://patchwork.libcamera.org/api/series/4925/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4925", "date": "2024-12-20T16:26:46", "name": "Improve regulation on rkisp1", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4925/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/22447/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/22447/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 A5370C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 20 Dec 2024 16:27:51 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C581C684C6;\n\tFri, 20 Dec 2024 17:27:50 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C4573684B0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Dec 2024 17:27:46 +0100 (CET)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:4eeb:7fa7:1fd0:c13d])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 04073C67;\n\tFri, 20 Dec 2024 17:27:06 +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=\"E0rmwOPn\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1734712027;\n\tbh=rRS2641M0Mw6O+i8N9WGWcaIbAsjseHCybenQx4pQwc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=E0rmwOPny3Kh5NeLiBeXLSdPnqNAmF+J2hrp0Fao0yGHnJCeEyFIcBk+te/0pXa3j\n\tp90v8a7zyZSDYBmUJtGpnfpy7/YiHIswf+vmXVDvYCpXf48o6oqSk4+2f6iJXQNpta\n\t6JIz3a5UNI6YD4TCzj06a/iTyme/PkcTACIqKR8U=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[RFC PATCH 7/7] ipa: rkisp1: Set frameContext.agc in queueRequest\n\tfor auto mode also", "Date": "Fri, 20 Dec 2024 17:26:53 +0100", "Message-ID": "<20241220162724.756494-8-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20241220162724.756494-1-stefan.klug@ideasonboard.com>", "References": "<20241220162724.756494-1-stefan.klug@ideasonboard.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": "If the agc is in auto mode, exposure time and gain used to be set on the\nframe context within prepare(). As exposure time and gain are used by\ngetSensorControls(0) from within start() that is too late (prepare()\nhasn't run yet). Also prepare() is documented as the place to initialize\nthe params buffer, not the frame context. From the pipeline point of\nview, prepare() gets called immediately after queueRequest(). Therefore\nwe can safely move setting the frame context into queueRequest() to fix\nthe sensor controls for start().\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n src/ipa/rkisp1/algorithms/agc.cpp | 10 ++++------\n 1 file changed, 4 insertions(+), 6 deletions(-)", "diff": "diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\nindex 40e5a8f481b2..46be1413a728 100644\n--- a/src/ipa/rkisp1/algorithms/agc.cpp\n+++ b/src/ipa/rkisp1/algorithms/agc.cpp\n@@ -243,7 +243,10 @@ void Agc::queueRequest(IPAContext &context,\n \n \tframeContext.agc.autoEnabled = agc.autoEnabled;\n \n-\tif (!frameContext.agc.autoEnabled) {\n+\tif (frameContext.agc.autoEnabled) {\n+\t\tframeContext.agc.exposure = context.activeState.agc.automatic.exposure;\n+\t\tframeContext.agc.gain = context.activeState.agc.automatic.gain;\n+\t} else {\n \t\tframeContext.agc.exposure = agc.manual.exposure;\n \t\tframeContext.agc.gain = agc.manual.gain;\n \t}\n@@ -283,11 +286,6 @@ void Agc::queueRequest(IPAContext &context,\n void Agc::prepare(IPAContext &context, const uint32_t frame,\n \t\t IPAFrameContext &frameContext, RkISP1Params *params)\n {\n-\tif (frameContext.agc.autoEnabled) {\n-\t\tframeContext.agc.exposure = context.activeState.agc.automatic.exposure;\n-\t\tframeContext.agc.gain = context.activeState.agc.automatic.gain;\n-\t}\n-\n \tif (frame > 0 && !frameContext.agc.updateMetering)\n \t\treturn;\n \n", "prefixes": [ "RFC", "7/7" ] }