From patchwork Fri Feb 28 12:55:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 22899 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 7C473C3259 for ; Fri, 28 Feb 2025 12:56:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B7E9E687CB; Fri, 28 Feb 2025 13:56:16 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Ae7Nzjvi"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 18C1868773 for ; Fri, 28 Feb 2025 13:56:14 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:a7e:b81b:5754:579]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D0F49929; Fri, 28 Feb 2025 13:54:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740747284; bh=LgU4acq5yqLQ2wUtNlDIIWoSCllRxXnZNKngJXlBOb0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ae7NzjviZFJJbUcarNWN1L6j2ZwJQXtK4R/S0N2OHstr+edIhqsMW2obAZ1iK2yrh lvF5oaTUJ9HwLLtFDthJ6QEQ5cLx12hsenreH2llAmXjNNkN3eM5qypclZVhNxrSme NYYE/7T4Vpk4Y0ArFgcyCIf4Z3M+irp7fEG7Vm8E= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH 3/3] ipa: rksip1: Remove setControls(0) to reduce startup oscillations Date: Fri, 28 Feb 2025 13:55:55 +0100 Message-ID: <20250228125600.3241397-4-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250228125600.3241397-1-stefan.klug@ideasonboard.com> References: <20250228125600.3241397-1-stefan.klug@ideasonboard.com> 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 call to setControls(0) is counter productive. At start() time, no requests were queued and no stats were received. So setControls(0) accesses a zeroed frame context and in turn sends 0 as gain, exposure and vblank to the pipeline handler and DelayedControls. This leads to strong oscillations on every start of the camera. A proper fix for handling the startup controls still needs to be done and was already started in [1] and [2]. From a DelayedControls point of view the call to setControls(0) is also unnecessary as DelayedControls treat frame 0 as already being queued in after initialization. So it is save to just remove it and the removal fixes the zero effectiveExposureValue discussed in the previous patch for rkisp1. [1]: https://patchwork.libcamera.org/patch/21708/ [2]: https://patchwork.libcamera.org/patch/22445/ Signed-off-by: Stefan Klug Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/ipa/rkisp1/rkisp1.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 5f1583e8219b..b09dd6efdf08 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -211,8 +211,6 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision, int IPARkISP1::start() { - setControls(0); - return 0; }