{"id":26036,"url":"https://patchwork.libcamera.org/api/patches/26036/?format=json","web_url":"https://patchwork.libcamera.org/patch/26036/","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":"<20260129082814.1777779-9-paul.elder@ideasonboard.com>","date":"2026-01-29T08:28:14","name":"[v6,8/8] camera, ipa: all: Remove AeEnable handling","commit_ref":null,"pull_url":null,"state":"new","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/26036/mbox/","series":[{"id":5753,"url":"https://patchwork.libcamera.org/api/series/5753/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5753","date":"2026-01-29T08:28:06","name":"Add Layers support","version":6,"mbox":"https://patchwork.libcamera.org/series/5753/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/26036/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/26036/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 C116CC3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 29 Jan 2026 08:28:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 768E561FE4;\n\tThu, 29 Jan 2026 09:28:43 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 04EEA61FE2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 Jan 2026 09:28:39 +0100 (CET)","from neptunite.flets-east.jp (unknown\n\t[IPv6:2404:7a81:160:2100:2eea:f891:1bd7:2691])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8C8FF6A6;\n\tThu, 29 Jan 2026 09:28:00 +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=\"jXyLGT4a\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769675281;\n\tbh=a2hT0gPuYo7MODV/zEOPDXAv4CrOeNM5yNV2wzIyCg0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=jXyLGT4a16Q+hTbVmFMIFEt4fRcD3Rf8K21DUczQ2dYKpkmycMl133jF8Y1iaRF/e\n\tJW9vQkx9EXLn7FsJcSYYmWH3OuV0ppW43QIDDbV3BL7HnFBQgfBy49eUtn0kCW4MDF\n\tJ6u9COhdisjIdJOnbtUxST3YevT/jwdzIEdZOBXA=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Paul Elder <paul.elder@ideasonboard.com>","Subject":"[PATCH v6 8/8] camera, ipa: all: Remove AeEnable handling","Date":"Thu, 29 Jan 2026 17:28:14 +0900","Message-ID":"<20260129082814.1777779-9-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.47.2","In-Reply-To":"<20260129082814.1777779-1-paul.elder@ideasonboard.com>","References":"<20260129082814.1777779-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 v6\n\nNo change in v5\n\nNo change in v4\n\nNo change in v3\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 014fd12452ac..2acc45cc0b04 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 1ecaff680978..55cadb1793a5 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 322694985e72..eceb9d14d74d 100644\n--- a/src/ipa/rpi/common/ipa_base.cpp\n+++ b/src/ipa/rpi/common/ipa_base.cpp\n@@ -56,8 +56,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 4ed9a21726d9..29042fce1466 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -1339,33 +1339,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@@ -1434,9 +1407,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@@ -1477,16 +1447,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 3bd51733d400..bad20d2c7712 100644\n--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n@@ -610,11 +610,6 @@ int UVCCameraData::init(std::shared_ptr<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":["v6","8/8"]}