[{"id":37854,"web_url":"https://patchwork.libcamera.org/comment/37854/","msgid":"<176907339983.3882822.1288777935580795985@neptunite.rasen.tech>","date":"2026-01-22T09:16:39","subject":"Re: [PATCH v1 20/35] libcamera: delayed_controls: Ignore double\n\tpushes for the same frame number","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Quoting Stefan Klug (2025-10-24 17:50:44)\n> For successful PFC a single sequence must only be pushed once to delayed\n> controls. Such a situation can occur if no-ops were pushed in delayed\n> controls due to a buffer underrun.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>  src/libcamera/delayed_controls.cpp | 8 +++++++-\n>  1 file changed, 7 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp\n> index 8239f3dcf347..3dead0dc4429 100644\n> --- a/src/libcamera/delayed_controls.cpp\n> +++ b/src/libcamera/delayed_controls.cpp\n> @@ -176,6 +176,8 @@ bool DelayedControls::push(uint32_t sequence, const ControlList &controls)\n>                 LOG(DelayedControls, Warning)\n>                         << \"Double push for sequence \" << sequence\n>                         << \" current queue index: \" << queueCount_;\n> +               LOG(DelayedControls, Warning) << \"ignore silently\";\n\nI think this can be merged with the first log line.\n\n> +               return true;\n>         }\n>  \n>         while (sequence > queueCount_) {\n> @@ -278,7 +280,11 @@ ControlList DelayedControls::get(uint32_t sequence)\n>   */\n>  void DelayedControls::applyControls(uint32_t sequence)\n>  {\n> -       LOG(DelayedControls, Debug) << \"frame \" << sequence << \" started\";\n> +       LOG(DelayedControls, Debug)\n> +               << \"Apply controls for: \" << sequence\n> +               << \" expected: \" << writeCount_\n> +               << \" (instant controls for frame \"\n> +               << (sequence - maxDelay_) << \")\";\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n>  \n>         while (queueCount_ - 1 < sequence) {\n>                 LOG(DelayedControls, Warning)\n> -- \n> 2.48.1\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E33E6BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 09:16:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 82A2E61FDA;\n\tThu, 22 Jan 2026 10:16:48 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2429161FC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 10:16:46 +0100 (CET)","from neptunite.rasen.tech (unknown\n\t[IPv6:2404:7a81:160:2100:8816:a947:ebed:2ec7])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 355162DD;\n\tThu, 22 Jan 2026 10:16:12 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ig+aTFph\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769073373;\n\tbh=Lx3WfguA6LI0eM4Sfug8Snsd6E9N8lf9vSAWBq7AjLk=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=ig+aTFphf/NugXmQ3vz3WEV9MaaQkPFiL0HKIsWns4EwKNpGR+1u41TY1JW5xfE9/\n\tKsmPb3iQeFG8dMTXnIvXi/FSlFgRjb+7OGP6cUoiGCvbu1g1ef4WnEPP3P+AKz9QP/\n\tGhEQn3KaZLpBLhWN7WXoVpFWKBsdSF+eBV9oEo50=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251024085130.995967-21-stefan.klug@ideasonboard.com>","References":"<20251024085130.995967-1-stefan.klug@ideasonboard.com>\n\t<20251024085130.995967-21-stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH v1 20/35] libcamera: delayed_controls: Ignore double\n\tpushes for the same frame number","From":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 22 Jan 2026 18:16:39 +0900","Message-ID":"<176907339983.3882822.1288777935580795985@neptunite.rasen.tech>","User-Agent":"alot/0.0.0","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]