From patchwork Mon Sep 22 08:37:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 24436 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 8E91ABDB1C for ; Mon, 22 Sep 2025 08:37:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2DC076B5F9; Mon, 22 Sep 2025 10:37:18 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="A6az1kz+"; dkim-atps=neutral Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A157E6B58E for ; Mon, 22 Sep 2025 10:37:15 +0200 (CEST) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3b9edf4cf6cso3507065f8f.3 for ; Mon, 22 Sep 2025 01:37:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1758530235; x=1759135035; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=h3CcS5dzY0ZH6Q0MQGIdueiz+bLH5Mm4iQforFBMD5s=; b=A6az1kz+fX9k6fypkLeKBd/yhCTnUKTgxqdFLey7EmjE5aLm4z39CFoCjQCWOFhtcL amZbTQIUt5bgZyhesxo59+ixxaM/8hkIQZFIDHPF3OIB6DLDeyt6QcoXKGB9fwzrWv8A fs4rjiwT6nflegxHED07nPWPD811fQosYjkcNUY3S8iEb29bAlDm16uSBUDmI12NqL3o HaqyI6RR4gEXnd6/3m8n6pk3ztudhpkAVzTWuHcc3W1t5mXPq8xj3qCjr/jRiYE7s6/V j3n5uLnwpt1JWIBsEqJ7SsceyefB2vx/8ShpjPG4dutoRX5L7FwPClasIVLAOaiCiSRO 6Vfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758530235; x=1759135035; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=h3CcS5dzY0ZH6Q0MQGIdueiz+bLH5Mm4iQforFBMD5s=; b=eumy6zGqzHarqeYssqvmMBoCtnfi8x65cfBzKXaWmIkjFkI5RkQY1clwlsOWZLSA9n 9W33koi06TMx8y3SJWQT+D+w7cj8TBJhIyjF/gnoTIoPi/WEyv5+VcKEq0rXoI88CTkj tcFmpRpUPegTEN3P7W2ZTvUA+e4Vjt55FPmKKVz94sOdHXPN4/MDPNZcHAL5uTp4WCg3 mnO1AfCyavkrmvDD6P40Xf02Mrkf8wK8eFaOzfImGzUDelZpgjda5NFvljMJrNy3Zw7Q EaYoN41HrwGddN1dVW6L7zKce8L7z87zHZj2O6TukCtxPqNtGb3rkF1upG2kxhYpsuLv 1E8Q== X-Gm-Message-State: AOJu0YxnnTiZQtgP+vNysxmhqZZZ5D0vjmLeHZw4453M+2VFEyyTBAG6 iLZKxzo7Z/EwlVDP/IFIZIHe0nSjgJPBN4lcOP8rXTFCV2SfkHAQuT73mc/X8S5OE3Rew/GSluN 0O0Ll X-Gm-Gg: ASbGncuHyxLsIh/+ITna/BH/v471xIY3yJT7HwIbl0TwXqlLKepxp5ylhCFAl6K5YYy XXLy2MEKTLhBD1uU6l1A59QwS7EBoNau3nS62rM+sklOftExDKCB0lEcqpJC55f4AhLO9Qsjya1 TUC6EZBjBsOTn8RTacXsBxzRu2JVr9OXuVYHrS8b8+XkH0Pr8/xbU68093sGllSXOBYZ0FciFSq 9prOkSNRHAz6XlagWX4JiWAsUzo6R2C7XH8IZGKh9yjk5dZpME22iG0XelHDMaPq3JTqBbIO0ok 63Ob2ezUlhxLjX8CtNFGP+PWdL/KcTHGuehxN3jUhZ4Ix4WTxPHMa/0MFDKNhANqA6OVmtgVKFv SfIQszwys7DJghRXTxc2hUEnwNIOJ/NL+MsY8Vlz21xt8nlIFbnzSX+j84i4X+3BKnoMSAEs+AS eVQNCIXS1N94Onj3pa3cR3U9upRbiSt7BQFYgpspwIAF5iroAKTw== X-Google-Smtp-Source: AGHT+IFpCwe6wWDypuQATcnzxke7lh/FJdRcApYiI33IImKxZuI82bOLUPXZrJosXYjcg3wNiedfkA== X-Received: by 2002:a05:6000:401f:b0:400:818:bae9 with SMTP id ffacd0b85a97d-4000818be40mr795688f8f.32.1758530234615; Mon, 22 Sep 2025 01:37:14 -0700 (PDT) Received: from raspberrypi.pitowers.org ([2a00:1098:3142:1f:ffc9:aff6:7f7f:893b]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-464f64ad1b0sm215823005e9.21.2025.09.22.01.37.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Sep 2025 01:37:14 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Cc: David Plowman Subject: [PATCH] ipa: rpi: agc: Allow exposure mode to be updated in auto mode Date: Mon, 22 Sep 2025 09:37:12 +0100 Message-Id: <20250922083712.3364-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The code was only allowing the exposure mode to be updated when both exposure/gain were in manual mode, which is a mistake. It needs to be updatable precisely when the auto modes are enabled. The fix is to ignore the enabled/disabled status of AEC/AGC, matching our other controls (metering mode, constraint mode etc.). While there might be a debate to be had about what the actual behaviour of all these controls should be, for the time being we'll just match everything else. Signed-off-by: David Plowman Reviewed-by: Naushir Patuck --- src/ipa/rpi/common/ipa_base.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp index 6448e6ab..8dfe35cc 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -1026,13 +1026,6 @@ void IpaBase::applyControls(const ControlList &controls) break; } - /* - * Ignore AE_EXPOSURE_MODE if the shutter or the gain - * are in auto mode. - */ - if (agc->autoExposureEnabled() || agc->autoGainEnabled()) - break; - int32_t idx = ctrl.second.get(); if (ExposureModeTable.count(idx)) { agc->setExposureMode(ExposureModeTable.at(idx));