From patchwork Tue Sep 23 19:06:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 24440 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 D4F78C32A9 for ; Tue, 23 Sep 2025 19:07:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8FB7D6B606; Tue, 23 Sep 2025 21:07:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="ADlLHnE1"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 252C36B5C4 for ; Tue, 23 Sep 2025 21:07:03 +0200 (CEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 0EF5040A38 for ; Tue, 23 Sep 2025 19:07:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23BD6C4CEF5; Tue, 23 Sep 2025 19:07:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758654421; bh=ramw4DO9WLojIiNJYWPw1VXQmGJRsjyRNuX+hJ5G2z4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ADlLHnE1/CBQvWfy+lHfT3LUw14xaqVctWAIthjpDGdHTEP87M8MjzTz7Xfy4XnBh GOzqEw7BBExkPcEc1NIoygQSoGuEgV9Dnk/h5vA2dpCBIKFz/99S9VS9XOPb/bXCTS A+PdV8dvL88VPZ/xU48yHdLXle5t8HjW/aBxSOTN0cNNcrujVQSYqFzPOv5zhX40RY kLv/IBaUlljc6oMq5qmmOKDnbHPSUqvsLHNFBzhLYmIdj2OxsDQpk5/QbPZOQUkONb yBnOwvxh3MAFe9GsHIzk0p5CIyJhqscHX974cbVpMcCG9kPd8cPedY33Oae9VG9jIo 6bgNRfbjL5EAw== From: Hans de Goede To: libcamera-devel@lists.libcamera.org Cc: Hans de Goede Subject: [PATCH 1/5] ipa: software_isp: Fix context_.configuration.agc.againMin init Date: Tue, 23 Sep 2025 21:06:53 +0200 Message-ID: <20250923190657.21453-2-hansg@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250923190657.21453-1-hansg@kernel.org> References: <20250923190657.21453-1-hansg@kernel.org> 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" Currently context_.configuration.agc.againMin is not initialized when the control reports a non 0 minumum gain value. So far only the againMin == 0 case was handled and context_.configuration.agc.againMin was left unset otherwise. Signed-off-by: Hans de Goede Reviewed-by: Milan Zamazal Reviewed-by: Isaac Scott --- src/ipa/simple/soft_simple.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp index c94c4cd55..e70439ee5 100644 --- a/src/ipa/simple/soft_simple.cpp +++ b/src/ipa/simple/soft_simple.cpp @@ -246,7 +246,9 @@ int IPASoftSimple::configure(const IPAConfigInfo &configInfo) * other) we limit the range of the gain values used. */ context_.configuration.agc.againMax = againMax; - if (!againMin) { + if (againMin) { + context_.configuration.agc.againMin = againMin; + } else { LOG(IPASoft, Warning) << "Minimum gain is zero, that can't be linear"; context_.configuration.agc.againMin =