Patch Detail
Show a patch.
GET /api/patches/24790/?format=api
{ "id": 24790, "url": "https://patchwork.libcamera.org/api/patches/24790/?format=api", "web_url": "https://patchwork.libcamera.org/patch/24790/", "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": "<20251024085130.995967-25-stefan.klug@ideasonboard.com>", "date": "2025-10-24T08:50:48", "name": "[v1,24/35] ipa: rkisp1: Ensure controls don't get lost", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "71ebad9de066e5394f3413d49e19f86a6c7e4bb0", "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/24790/mbox/", "series": [ { "id": 5524, "url": "https://patchwork.libcamera.org/api/series/5524/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5524", "date": "2025-10-24T08:50:24", "name": "rkisp1: pipeline rework for PFC", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5524/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/24790/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/24790/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 A5F78BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Oct 2025 08:52:51 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 634F960920;\n\tFri, 24 Oct 2025 10:52:51 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C597F608C7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Oct 2025 10:52:49 +0200 (CEST)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:7edc:62f4:c118:1549])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 2ADDF484E; \n\tFri, 24 Oct 2025 10:51:04 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"rcQJLIbR\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761295864;\n\tbh=CrYhuF6fM2fE7Fad53k80vqInEOP7VuATyquavW7HVs=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=rcQJLIbRTAiG/gvTGiYTEyBcdtnXBWTW8HfWNna8hqR5A92fjtbMKB68havIH+Sem\n\t0g+rJ6bMEM0Fd7DjBRZZlj6ojsE0MndeI9Kn/54zPdRCTx7ulE0bPz8FODUH1JtUXG\n\t4Bb+VqMZmAHDvrV5sLF6N/dexru/X9Oyev4PPqrA=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH v1 24/35] ipa: rkisp1: Ensure controls don't get lost", "Date": "Fri, 24 Oct 2025 10:50:48 +0200", "Message-ID": "<20251024085130.995967-25-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.48.1", "In-Reply-To": "<20251024085130.995967-1-stefan.klug@ideasonboard.com>", "References": "<20251024085130.995967-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 a request too late for controls queuing because the frame context was\nalready initialised, store the controls and apply them on the next\nrequest.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\nipa: rkisp1: Store controls on when necessary\n\nStore controls for later only when necessary. Add a proper log message for that condition.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n src/ipa/rkisp1/rkisp1.cpp | 22 ++++++++++++++++++++--\n 1 file changed, 20 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 23d80bc43c5d..b714e2f10c65 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -86,6 +86,7 @@ private:\n \tstd::map<unsigned int, MappedFrameBuffer> mappedBuffers_;\n \n \tControlInfoMap sensorControls_;\n+\tControlList controlsToApply_;\n \n \t/* Local parameter storage */\n \tstruct IPAContext context_;\n@@ -343,16 +344,33 @@ void IPARkISP1::initializeFrameContext(const uint32_t frame,\n \t\t\t\t IPAFrameContext &frameContext,\n \t\t\t\t const ControlList &controls)\n {\n-\tif (frameContext.initialised)\n+\tif (frameContext.initialised) {\n+\t\tif (!controls.empty()) {\n+\t\t\t/* Too late to apply the controls. Store them for later. */\n+\t\t\tLOG(IPARkISP1, Warning)\n+\t\t\t\t<< \"Request underrun. Controls for frame \"\n+\t\t\t\t<< frame << \" are delayed \";\n+\t\t\tcontrolsToApply_.merge(controls,\n+\t\t\t\t\t ControlList::MergePolicy::OverwriteExisting);\n+\t\t}\n \t\treturn;\n+\t}\n+\n+\tconst ControlList *controls2 = &controls;\n+\tif (!controlsToApply_.empty()) {\n+\t\tcontrolsToApply_.merge(controls, ControlList::MergePolicy::OverwriteExisting);\n+\t\tcontrols2 = &controlsToApply_;\n+\t}\n \n \tframeContext.initialised = true;\n \tfor (auto const &a : algorithms()) {\n \t\tAlgorithm *algo = static_cast<Algorithm *>(a.get());\n \t\tif (algo->disabled_)\n \t\t\tcontinue;\n-\t\talgo->queueRequest(context_, frame, frameContext, controls);\n+\t\talgo->queueRequest(context_, frame, frameContext, *controls2);\n \t}\n+\n+\tcontrolsToApply_.clear();\n }\n \n void IPARkISP1::computeParams(const uint32_t frame, const uint32_t bufferId)\n", "prefixes": [ "v1", "24/35" ] }