From patchwork Fri Dec 20 16:26:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 22440 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 287A1C327D for ; Fri, 20 Dec 2024 16:27:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C663C684B1; Fri, 20 Dec 2024 17:27:29 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="XmkpN8v1"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EB943684A5 for ; Fri, 20 Dec 2024 17:27:27 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:4eeb:7fa7:1fd0:c13d]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 831EFB2B; Fri, 20 Dec 2024 17:26:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1734712008; bh=Twsi5KWeq8yPsfcweeDhEhVptvFHGRG/k/iNcnbLKmE=; h=From:To:Cc:Subject:Date:From; b=XmkpN8v1djUK3I8gfzmOjH2TV4wGKs6wYewI3nYOPfDONoW9jDBbE4/uwo279vzlt 6CmMNW3zvt1nGR686hIlXM3ylja7QvAli86On9h4+p141P0WKOaT+EUAWMgahb+sHW Td7vqHrdF4Q3AhI+DUsE9aRRDRzlylBmzYmYQaG4= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [RFC PATCH 0/7] Improve regulation on rkisp1 Date: Fri, 20 Dec 2024 17:26:46 +0100 Message-ID: <20241220162724.756494-1-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 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" Hi all, I was looking at some strange AE regulation issues on imx8mp (massive oscillations and going to a complete white image in the beginning). This series adds a few fixes in that area and maybe eases debugging a little bit. Patch 1-3 add a sequence number to DelayedControls::push() without modifying the existing behaviour. This helps in spotting asymetric push()/apply()/get() calls. Patch 4-7 add handling of controls supplied to camera->start() for the rkisp1 pipeline. This has the nice side effect, that initial settings from the AGC module get applied to the sensor before start. With this series the startup behavior on my setup has greatly improved. There is still some more testing needed, but it would be great to get some feedback on this. Best regards & Merry Christmas Stefan Stefan Klug (7): libcamera: delayed_controls: Add push() function that accepts a sequence number libcamera: delayed_controls: Increase log level for dummy pushes pipeline: rkisp1: Include frame number when pushing to delayed controls pipeline: rkisp1: Refactor setControls() pipeline: rkisp1: Apply initial controls ipa: rkisp1: Add a lookahead of one frame when sending sensor controls ipa: rkisp1: Set frameContext.agc in queueRequest for auto mode also include/libcamera/internal/delayed_controls.h | 1 + include/libcamera/ipa/rkisp1.mojom | 7 +++- src/ipa/rkisp1/algorithms/agc.cpp | 10 +++--- src/ipa/rkisp1/rkisp1.cpp | 36 +++++++++++-------- src/libcamera/delayed_controls.cpp | 35 ++++++++++++++++-- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 15 +++++--- 6 files changed, 76 insertions(+), 28 deletions(-)