Patch Detail
Show a patch.
GET /api/1.1/patches/24780/?format=api
{ "id": 24780, "url": "https://patchwork.libcamera.org/api/1.1/patches/24780/?format=api", "web_url": "https://patchwork.libcamera.org/patch/24780/", "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": "<20251024085130.995967-15-stefan.klug@ideasonboard.com>", "date": "2025-10-24T08:50:38", "name": "[v1,14/35] pipeline: rkisp1: Apply initial controls", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "8d05ed5ab6c74c2ade5de553e7b75d92ce1d3858", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/24780/mbox/", "series": [ { "id": 5524, "url": "https://patchwork.libcamera.org/api/1.1/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/24780/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/24780/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 BD517C3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Oct 2025 08:52:20 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 77137608CF;\n\tFri, 24 Oct 2025 10:52:20 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1248960871\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Oct 2025 10:52:19 +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 712611E78; \n\tFri, 24 Oct 2025 10:50:33 +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=\"KwgUu2O9\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761295833;\n\tbh=sd74pbBwO3nWmh/S9dWBYar+SIVGoaUGf49d0DRvwhg=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=KwgUu2O9q56oXIsCzdWbqtvUQ8cE+kjIKXBkyDY52hO8tj4txiip0dktgDWvC7UtN\n\t98f/KdVlD8QKo6CGQtnyv6MHPussERUoa/G1ro97+9LUWzd+deElkGgFi84W57k/m3\n\tybqpIoWQML/bKyM3W1eQNMQyKw8xVoR8i7eILHso=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH v1 14/35] pipeline: rkisp1: Apply initial controls", "Date": "Fri, 24 Oct 2025 10:50:38 +0200", "Message-ID": "<20251024085130.995967-15-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": "Controls passed to Camera::start() are not handled at the moment.\nImplement that by initializing a separate frame\ncontext and then returning the controls synchronously to the caller. In\nthe pipeline the controls get passed to the sensor before the call to\nstreamOn() to ensure the controls are applied right away. Passing the\ncontrols to the pipeline using the setSensorControls signal is not\nappropriate because it is asynchronous and would reach the sensor too\nlate (initial controls need to be applied before the sensor starts and\nbefore delayed controls initializes it's start condition.)\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n include/libcamera/ipa/rkisp1.mojom | 7 ++++++-\n src/ipa/rkisp1/rkisp1.cpp | 10 ++++++----\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 11 +++++++++--\n 3 files changed, 21 insertions(+), 7 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom\nindex 068e898848c4..4c29b53cd7f9 100644\n--- a/include/libcamera/ipa/rkisp1.mojom\n+++ b/include/libcamera/ipa/rkisp1.mojom\n@@ -14,13 +14,18 @@ struct IPAConfigInfo {\n \tuint32 paramFormat;\n };\n \n+struct StartResult {\n+\tlibcamera.ControlList controls;\n+\tint32 code;\n+};\n+\n interface IPARkISP1Interface {\n \tinit(libcamera.IPASettings settings,\n \t uint32 hwRevision, uint32 supportedBlocks,\n \t libcamera.IPACameraSensorInfo sensorInfo,\n \t libcamera.ControlInfoMap sensorControls)\n \t\t=> (int32 ret, libcamera.ControlInfoMap ipaControls);\n-\tstart() => (int32 ret);\n+\tstart(libcamera.ControlList controls) => (StartResult result);\n \tstop();\n \n \tconfigure(IPAConfigInfo configInfo,\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex a55bac260026..7a7b7682e242 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -56,7 +56,7 @@ public:\n \t\t const IPACameraSensorInfo &sensorInfo,\n \t\t const ControlInfoMap &sensorControls,\n \t\t ControlInfoMap *ipaControls) override;\n-\tint start() override;\n+\tvoid start(const ControlList &controls, StartResult *result) override;\n \tvoid stop() override;\n \n \tint configure(const IPAConfigInfo &ipaConfig,\n@@ -215,10 +215,12 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision,\n \treturn 0;\n }\n \n-int IPARkISP1::start()\n+void IPARkISP1::start(const ControlList &controls, StartResult *result)\n {\n-\t/* \\todo Properly handle startup controls. */\n-\treturn 0;\n+\tIPAFrameContext frameContext = {};\n+\tinitializeFrameContext(0, frameContext, controls);\n+\tresult->controls = getSensorControls(frameContext);\n+\tresult->code = 0;\n }\n \n void IPARkISP1::stop()\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 0e6e45bba75b..d937c94e351f 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -1290,13 +1290,20 @@ int PipelineHandlerRkISP1::start(Camera *camera, [[maybe_unused]] const ControlL\n \t\treturn ret;\n \tactions += [&]() { freeBuffers(camera); };\n \n-\tret = data->ipa_->start();\n-\tif (ret) {\n+\tControlList ctrls;\n+\tif (!!controls)\n+\t\tctrls = *controls;\n+\n+\tipa::rkisp1::StartResult res;\n+\tdata->ipa_->start(ctrls, &res);\n+\tif (res.code) {\n \t\tLOG(RkISP1, Error)\n \t\t\t<< \"Failed to start IPA \" << camera->id();\n \t\treturn ret;\n \t}\n \tactions += [&]() { data->ipa_->stop(); };\n+\tdata->sensor_->setControls(&res.controls);\n+\tdata->delayedCtrls_->reset();\n \n \tdata->frame_ = 0;\n \n", "prefixes": [ "v1", "14/35" ] }