From patchwork Mon Sep 14 14:02:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 28246 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 8A49FC3200 for ; Mon, 14 Sep 2026 14:03:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 31DA1686A5; Mon, 14 Sep 2026 16:03:36 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RbtrQ/le"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 15A3368670 for ; Mon, 14 Sep 2026 16:03:33 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:a279:75fa:1f6c:7f40]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id F1CFC929; Mon, 14 Sep 2026 16:01:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1789394513; bh=Fa6CkRFaTm+VXywmGg52of+mJwGGUY47q88jS0QmocU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RbtrQ/le/KMYyplyTd2bA8QuprU3h3L8UAZuZA0Mqxq3YJcIatzuKywtpNqCRh1WK w3CdNnDZcmYDFaPlMjt307SX5ATq8V2iFfZopWTF6zlzqQsss2eq/pBmAT+Xm9VXBA tsu7xsnTs4KJUfiImwbQjs9WN8KQ3ZSLazG8ZIcM= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Paul Elder Subject: [PATCH v3 02/41] libcamera: delayed_controls: Handle missed pushes Date: Mon, 14 Sep 2026 16:02:15 +0200 Message-ID: <20260914140309.3354666-3-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260914140309.3354666-1-stefan.klug@ideasonboard.com> References: <20260914140309.3354666-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" In unstable systems it can happen, that some sequence numbers are missed in the IPA. Gracefully handle that situation by queuing no-ops. Signed-off-by: Stefan Klug Reviewed-by: Paul Elder --- Changes in v3: - Dropped assert as it breaks the tests and will not be needed after "libcamera: delayed_controls: Ignore double pushes for the same frame number" is applied Changes in v2: - Collected tag --- src/libcamera/delayed_controls.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp index 36d1f20a3680..af0befa56f77 100644 --- a/src/libcamera/delayed_controls.cpp +++ b/src/libcamera/delayed_controls.cpp @@ -178,6 +178,13 @@ bool DelayedControls::push(uint32_t sequence, const ControlList &controls) << " current queue index: " << queueCount_; } + while (sequence > queueCount_) { + LOG(DelayedControls, Warning) + << "Missed push for sequence " << queueCount_ + << " Auto queue no-op."; + push(queueCount_, {}); + } + /* Copy state from previous frame. */ for (auto &ctrl : values_) { Info &info = ctrl.second[queueCount_];