{"id":24005,"url":"https://patchwork.libcamera.org/api/patches/24005/?format=json","web_url":"https://patchwork.libcamera.org/patch/24005/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20250728115556.2886082-9-paul.elder@ideasonboard.com>","date":"2025-07-28T11:55:55","name":"[v3,8/8] camera, ipa: all: Remove AeEnable handling","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"9d607e256684f77293526101d41cdb9d45b4ca97","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/24005/mbox/","series":[{"id":5343,"url":"https://patchwork.libcamera.org/api/series/5343/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5343","date":"2025-07-28T11:55:47","name":"Add Layers support","version":3,"mbox":"https://patchwork.libcamera.org/series/5343/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/24005/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/24005/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 CA1DCC332B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Jul 2025 11:56:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 429786919D;\n\tMon, 28 Jul 2025 13:56:27 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 64FBC69189\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jul 2025 13:56:23 +0200 (CEST)","from neptunite.hamster-moth.ts.net (unknown\n\t[IPv6:2404:7a81:160:2100:5715:34ad:7742:5049])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 234C04A4;\n\tMon, 28 Jul 2025 13:55:39 +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=\"RmtlcFlf\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753703741;\n\tbh=IBbcv3qtPR/Ng2A96f0QLR51Ou+6qLm1jb2uWnMJObc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=RmtlcFlftP8EVFsS6+560rRFh3cufAAtHY1KhdGA8WGG2Ylto5Eru+PNMQZpfaVUj\n\tOVGsV8+i/BV6ZNLPg9kyZK9h2S992aZnsLp2j5Dk2r6Bmc1VxULE9fo1Aubpnl+1ir\n\ti0mHKvgKYi2EODHayQCf71KNgA5nx4538/7vkKnM=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Paul Elder <paul.elder@ideasonboard.com>, kieran.bingham@ideasonboard.com,\n\tbarnabas.pocze@ideasonboard.com","Subject":"[PATCH v3 8/8] camera, ipa: all: Remove AeEnable handling","Date":"Mon, 28 Jul 2025 20:55:55 +0900","Message-ID":"<20250728115556.2886082-9-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.47.2","In-Reply-To":"<20250728115556.2886082-1-paul.elder@ideasonboard.com>","References":"<20250728115556.2886082-1-paul.elder@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":"Remove AeEnable handling from the Camera and all IPAs, as it is now\nhandled by the inject_controls layer.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\n---\nThe mali-c55 IPA needs to support AnalogueGainMode and ExposureTimeMode,\nbut that is out of scope for this series.\n\nNo change in v2\n---\n src/ipa/mali-c55/algorithms/agc.cpp          |  1 +\n src/ipa/rkisp1/algorithms/agc.cpp            |  2 -\n src/ipa/rpi/common/ipa_base.cpp              |  2 -\n src/libcamera/camera.cpp                     | 42 +-------------------\n src/libcamera/pipeline/uvcvideo/uvcvideo.cpp |  5 ---\n 5 files changed, 3 insertions(+), 49 deletions(-)","diff":"diff --git a/src/ipa/mali-c55/algorithms/agc.cpp b/src/ipa/mali-c55/algorithms/agc.cpp\nindex 15963994b2d6..49151415d355 100644\n--- a/src/ipa/mali-c55/algorithms/agc.cpp\n+++ b/src/ipa/mali-c55/algorithms/agc.cpp\n@@ -137,6 +137,7 @@ int Agc::init(IPAContext &context, const YamlObject &tuningData)\n \tif (ret)\n \t\treturn ret;\n \n+\t/* \\todo Support AnalogueGainMode and ExposureTimeMode */\n \tcontext.ctrlMap[&controls::AeEnable] = ControlInfo(false, true);\n \tcontext.ctrlMap[&controls::DigitalGain] = ControlInfo(\n \t\tstatic_cast<float>(kMinDigitalGain),\ndiff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\nindex 35440b67e999..bb1558df5422 100644\n--- a/src/ipa/rkisp1/algorithms/agc.cpp\n+++ b/src/ipa/rkisp1/algorithms/agc.cpp\n@@ -155,8 +155,6 @@ int Agc::init(IPAContext &context, const YamlObject &tuningData)\n \t\tControlInfo({ { ControlValue(controls::AnalogueGainModeAuto),\n \t\t\t\tControlValue(controls::AnalogueGainModeManual) } },\n \t\t\t    ControlValue(controls::AnalogueGainModeAuto));\n-\t/* \\todo Move this to the Camera class */\n-\tcontext.ctrlMap[&controls::AeEnable] = ControlInfo(false, true, true);\n \tcontext.ctrlMap[&controls::ExposureValue] = ControlInfo(-8.0f, 8.0f, 0.0f);\n \tcontext.ctrlMap.merge(controls());\n \ndiff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex ce2343e91cde..ace22b0f4187 100644\n--- a/src/ipa/rpi/common/ipa_base.cpp\n+++ b/src/ipa/rpi/common/ipa_base.cpp\n@@ -55,8 +55,6 @@ constexpr Duration controllerMinFrameDuration = 1.0s / 30.0;\n \n /* List of controls handled by the Raspberry Pi IPA */\n const ControlInfoMap::Map ipaControls{\n-\t/* \\todo Move this to the Camera class */\n-\t{ &controls::AeEnable, ControlInfo(false, true, true) },\n \t{ &controls::ExposureTimeMode,\n \t  ControlInfo({ { ControlValue(controls::ExposureTimeModeAuto),\n \t\t\t  ControlValue(controls::ExposureTimeModeManual) } },\ndiff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex 241e646dcd31..4d63da020dd6 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -1337,33 +1337,6 @@ std::unique_ptr<Request> Camera::createRequest(uint64_t cookie)\n \treturn request;\n }\n \n-/**\n- * \\brief Patch a control list that contains the AeEnable control\n- * \\param[inout] controls The control list to be patched\n- *\n- * The control list is patched in place, turning the AeEnable control into\n- * the equivalent ExposureTimeMode/AnalogueGainMode controls.\n- */\n-void Camera::patchControlList(ControlList &controls)\n-{\n-\tconst auto &aeEnable = controls.get(controls::AeEnable);\n-\tif (aeEnable) {\n-\t\tif (_d()->controlInfo_.count(controls::AnalogueGainMode.id()) &&\n-\t\t    !controls.contains(controls::AnalogueGainMode.id())) {\n-\t\t\tcontrols.set(controls::AnalogueGainMode,\n-\t\t\t\t     *aeEnable ? controls::AnalogueGainModeAuto\n-\t\t\t\t\t       : controls::AnalogueGainModeManual);\n-\t\t}\n-\n-\t\tif (_d()->controlInfo_.count(controls::ExposureTimeMode.id()) &&\n-\t\t    !controls.contains(controls::ExposureTimeMode.id())) {\n-\t\t\tcontrols.set(controls::ExposureTimeMode,\n-\t\t\t\t     *aeEnable ? controls::ExposureTimeModeAuto\n-\t\t\t\t\t       : controls::ExposureTimeModeManual);\n-\t\t}\n-\t}\n-}\n-\n /**\n  * \\brief Queue a request to the camera\n  * \\param[in] request The request to queue to the camera\n@@ -1426,9 +1399,6 @@ int Camera::queueRequest(Request *request)\n \t\t}\n \t}\n \n-\t/* Pre-process AeEnable. */\n-\tpatchControlList(request->controls());\n-\n \td->layers_->queueRequest(request);\n \n \td->pipe_->invokeMethod(&PipelineHandler::queueRequest,\n@@ -1469,16 +1439,8 @@ int Camera::start(const ControlList *controls)\n \n \tControlList *newControls = d->layers_->start(controls);\n \n-\tif (controls) {\n-\t\tControlList copy(*newControls);\n-\t\tpatchControlList(copy);\n-\t\tret = d->pipe_->invokeMethod(&PipelineHandler::start,\n-\t\t\t\t\t     ConnectionTypeBlocking, this, &copy);\n-\t} else {\n-\t\tret = d->pipe_->invokeMethod(&PipelineHandler::start,\n-\t\t\t\t\t     ConnectionTypeBlocking, this, nullptr);\n-\t}\n-\n+\tret = d->pipe_->invokeMethod(&PipelineHandler::start,\n+\t\t\t\t     ConnectionTypeBlocking, this, newControls);\n \tif (ret)\n \t\treturn ret;\n \ndiff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\nindex 4b5816dfdde0..ab12d5b5ae9a 100644\n--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n@@ -607,11 +607,6 @@ int UVCCameraData::init(MediaDevice *media)\n \t\taddControl(cid, info, &ctrls);\n \t}\n \n-\tif (autoExposureMode_ && manualExposureMode_) {\n-\t\t/* \\todo Move this to the Camera class */\n-\t\tctrls[&controls::AeEnable] = ControlInfo(false, true, true);\n-\t}\n-\n \tcontrolInfo_ = ControlInfoMap(std::move(ctrls), controls::controls);\n \n \t/*\n","prefixes":["v3","8/8"]}