From patchwork Thu Sep 25 22:17:03 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: 24463 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 1BB42BDB1C for ; Thu, 25 Sep 2025 22:17:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9A4936B606; Fri, 26 Sep 2025 00:17:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="NfQqyKeq"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 434886B5F8 for ; Fri, 26 Sep 2025 00:17:14 +0200 (CEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id D1C8F4057B; Thu, 25 Sep 2025 22:17:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73F90C4CEF0; Thu, 25 Sep 2025 22:17:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758838632; bh=i8luKV32QotAPxo62xELugb2IsfDO0Szq6/oYQ9c35A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NfQqyKeqd+FzWj7BNiwZp8wmQVOZUeALTuFjTblv2XY0iF6VNa9uWlsRbe7vuGw70 ywNLgC1CA7TbFBf+jN7CWLpsLLjYHxLIEthoZWauVPhuf64ifTJCWn15H3+so4X4RX z//uCiWFmuxTW9qZthoyfgQXT54nklrW5r3KuZ89i4u0ma6PQhVh7+tJD3IsDOkYbF Gj49+0z6YNhp8enknfTDUPGTPAyBQWPtgOkz5Ndc32s/2h/bvwGFGj1vqTL4cidn5l Iy9ylay4sIq14luizIyEuqJGIj396aZbyouyxj5D59iJxpO/A/Ch7nhF8y7wPsXrpx kdHiUkN6r0CGQ== From: Hans de Goede To: libcamera-devel@lists.libcamera.org Cc: Hans de Goede , Milan Zamazal , Isaac Scott , Kieran Bingham Subject: [PATCH v2 1/6] ipa: software_isp: Fix context_.configuration.agc.againMin init Date: Fri, 26 Sep 2025 00:17:03 +0200 Message-ID: <20250925221708.7471-2-hansg@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250925221708.7471-1-hansg@kernel.org> References: <20250925221708.7471-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 minimum gain value. So far only the againMin == 0 case was handled and context_.configuration.agc.againMin was left unset otherwise. Reviewed-by: Milan Zamazal Reviewed-by: Isaac Scott Tested-by: Milan Zamazal Tested-by: Kieran Bingham Signed-off-by: Hans de Goede --- 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 c94c4cd5..e70439ee 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 =