From patchwork Sat Sep 27 17:59:59 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: 24479 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 C7187BDB1C for ; Sat, 27 Sep 2025 18:00:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3CA636B605; Sat, 27 Sep 2025 20:00:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="A2vHpYFe"; dkim-atps=neutral Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AC7306B5A2 for ; Sat, 27 Sep 2025 20:00:10 +0200 (CEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 5350C620A9; Sat, 27 Sep 2025 18:00:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAB93C113CF; Sat, 27 Sep 2025 18:00:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758996009; bh=i8luKV32QotAPxo62xELugb2IsfDO0Szq6/oYQ9c35A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A2vHpYFe7icjYEALGq4q4bxiK6uzhhUIGI0y9oNs2hpwbj2v94C0pB/KwBN7BWgeS xv4Jbu/ybtZEKwpMIZ6i7C7BuUjdMeW701WbhijIrxCRtRwlys1n2PRNqgKkInn6cQ oIx5c0X5o+/+H94QScxvP3vdirzq2Kewj1S7iSI9HXwnI0eZS/Z2R2+rtlIRiCxW/b EJxnlL2xhL9v+NtuqgIVJ64fU7Qzavn5l+pXBQe4xgI8rA67xg45bs0g7ZxaQIbZos 7vQ+iL35vFEu8jQdfXyv4JereAzeyhQC80PWPxlao3AviGTUpSXQEj4SrC5X0164Xz vcNjuSbeAjcpg== From: Hans de Goede To: libcamera-devel@lists.libcamera.org Cc: Hans de Goede , Milan Zamazal , Isaac Scott , Kieran Bingham Subject: [PATCH v3 1/6] ipa: software_isp: Fix context_.configuration.agc.againMin init Date: Sat, 27 Sep 2025 19:59:59 +0200 Message-ID: <20250927180004.84620-2-hansg@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250927180004.84620-1-hansg@kernel.org> References: <20250927180004.84620-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 =