From patchwork Wed Mar 25 15:13:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 26354 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 B11EBC32FC for ; Wed, 25 Mar 2026 15:15:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1127762882; Wed, 25 Mar 2026 16:15:16 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="GIc2qa0t"; 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 E1E8C62857 for ; Wed, 25 Mar 2026 16:15:14 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:b16a:5ed9:4ada:a95a]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id ED8321943; Wed, 25 Mar 2026 16:13:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1774451637; bh=X6yvf1PwwFd+CBeirPNd09zNmApLC+ULARtP3wJL9iA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GIc2qa0tRC1fv6oH+dOu/LQmuYz2ehhY7Qb9743sTEiSlwszdqCUvD96f/doseK+a 7t0IGhLobafESVvgDDTa4/ev53OuZqCDS8+A1bcQAusQtIQhvBoTdaNUQsJHdwhIEf U7zSEvqrITorqF28pjkImKs5VaeR9gujAZBdu3DY= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v2 12/32] pipeline: rkisp1: Fix controls in raw mode Date: Wed, 25 Mar 2026 16:13:44 +0100 Message-ID: <20260325151416.2114564-13-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260325151416.2114564-1-stefan.klug@ideasonboard.com> References: <20260325151416.2114564-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" After the pipeline restructuring setSensorControls is no longer emitted within process() but within computeParams(). In raw mode computeParams is not called and therefore setSensorControls is never emitted. Fix that by allowing computeParams to be called with an empty bufferId. This strategy is also used for processStats() to ensure that metadata gets filled in raw mode. Then call computeParams within frameStart() when in raw mode. Signed-off-by: Stefan Klug --- Changes in v2: - Call computeParams() within queueRequestDevice for now to make the patch easier to follow. Moving computeParams to frameStart() will happen in a later patch. --- src/ipa/rkisp1/rkisp1.cpp | 12 ++++++++++++ src/libcamera/pipeline/rkisp1/rkisp1.cpp | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 81430d6532ac..e06238a7abe9 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -343,6 +343,18 @@ void IPARkISP1::computeParams(const uint32_t frame, const uint32_t bufferId) { IPAFrameContext &frameContext = context_.frameContexts.get(frame); + /* + * \todo: This needs discussion. In raw mode, computeParams is + * called without a params buffer, to trigger the setSensorControls + * signal. Currently our algorithms don't support prepare calls with + * a nullptr. Do we need that or can we safely skip it? + */ + if (bufferId == 0) { + ControlList ctrls = getSensorControls(frameContext); + setSensorControls.emit(frame, ctrls); + return; + } + RkISP1Params params(context_.configuration.paramFormat, mappedBuffers_.at(bufferId).planes()[0]); diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index a3b78bf4dc6b..7352237dbb86 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -1350,6 +1350,12 @@ int PipelineHandlerRkISP1::queueRequestDevice(Camera *camera, Request *request) if (data->selfPath_ && info->selfPathBuffer) data->selfPath_->queueBuffer(info->selfPathBuffer); + + /* + * Call computeParams with an empty param buffer to trigger the + * setSensorControls signal. + */ + data->ipa_->computeParams(data->frame_, 0); } else { data->ipa_->computeParams(data->frame_, info->paramBuffer->cookie());