{"id":11257,"url":"https://patchwork.libcamera.org/api/1.1/patches/11257/?format=json","web_url":"https://patchwork.libcamera.org/patch/11257/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210212113312.239076-5-naush@raspberrypi.com>","date":"2021-02-12T11:33:11","name":"[libcamera-devel,4/5] libcamera: delayed_controls: Remove spurious no-op queued controls","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"8b1510affd6a171eb04c23c32794c76281209ab6","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/1.1/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/11257/mbox/","series":[{"id":1683,"url":"https://patchwork.libcamera.org/api/1.1/series/1683/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1683","date":"2021-02-12T11:33:07","name":"DelayedControls updates and fixes","version":1,"mbox":"https://patchwork.libcamera.org/series/1683/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/11257/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/11257/checks/","tags":{},"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 E3400BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Feb 2021 11:37:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A568F63778;\n\tFri, 12 Feb 2021 12:37:38 +0100 (CET)","from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7493663773\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Feb 2021 12:37:35 +0100 (CET)","by mail-wm1-x329.google.com with SMTP id o15so604784wmq.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Feb 2021 03:37:35 -0800 (PST)","from naush-laptop.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tv5sm10005020wro.71.2021.02.12.03.37.34\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 12 Feb 2021 03:37:34 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"PyDK2PjH\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=5vjj4cYR7d7qVH47wyq/bjJgcWDE/QbUdq7aNrrkbX8=;\n\tb=PyDK2PjHBFcyuFWMjuMBkiw5hiuCNMDxoGMCB5/f4mZT6ePPqqyD2oMHYB8lmzws5T\n\tAeFrm+2F/m+cBp72J22mQgvwQIJNOz0g/7Uzb1o1onS/uRtlrUaZmSz7hJpLDzH7b1mQ\n\tA4v42vtSCVETqG4pQoon5AtSHf9HW93jZj9wA7SuakLyKzE1NSrKpt03HBg1oHon8vhw\n\tpwxn5P80I8KXi7XmUoVcJvu24MhkKcKwhoLjyE6gQ/GKegPObwLsDWuYoK3cXClI7FMJ\n\tEzcWc2gpC9M6GxQgxEJ4bTuMPsfg3K9ZfnAsLMJ0l0d7ttJ8A4zu/zAPiCKsuBA3tPpj\n\t/ESA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=5vjj4cYR7d7qVH47wyq/bjJgcWDE/QbUdq7aNrrkbX8=;\n\tb=Ox+/qmhw5AxRFU/2xJ906CUY0zilqrW5oN7iaJUONR8DimdHjA+/pG3Yco3hHQE3KX\n\t6k+Z+PTFtJwZPEPhnIk5qIiGY9ErVtojp6h/VpbgpVybTxgVGh1+Ldzz3P4iKIsM+8VD\n\ttl0mBj4t2dAnFOwDP7DBwPhhT3jrSDblai1JMdW7ChcRrlF80p9wzj5QiGGBqvxPR2HH\n\tuk3HTBI5ptpwnQPov1k4J2mQHJwj4zD2jy3jqqdT2u7hMSDSj1UgO/at5TWvKQfIzZ+E\n\tTwh1jlbx/X2xwG2J5QPhZ50F6VLr2mIKLmIdE2OYv4e9s/n7nje2PpKCM+dw4KpQ4hEP\n\th47A==","X-Gm-Message-State":"AOAM532hI39m3KsfIhHnwoG32WnKwwDBzqAp1cU6Z3yOuq/OqZAQmBdG\n\tLCPgaKo+MWf456YcgchnNg2bjkqmll5aDPbU","X-Google-Smtp-Source":"ABdhPJzGL91ePRhsQRQ1+yUVeIoAw317B2SQ3tVdwiC94nx5xAsPGvP9hRchjMm6rRjYKCGNyN8ewQ==","X-Received":"by 2002:a05:600c:4242:: with SMTP id\n\tr2mr2247020wmm.109.1613129854894; \n\tFri, 12 Feb 2021 03:37:34 -0800 (PST)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 12 Feb 2021 11:33:11 +0000","Message-Id":"<20210212113312.239076-5-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20210212113312.239076-1-naush@raspberrypi.com>","References":"<20210212113312.239076-1-naush@raspberrypi.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH 4/5] libcamera: delayed_controls: Remove\n\tspurious no-op queued controls","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"In DelayedControls::applyControls(), the controls queue would be\nextended via a no-op control push to fill the intermittent slots with\nunchanged control values. This is needed so that we read back unchanged\ncontrol values correctly on every frame.\n\nHowever, there was one additional no-op performed on every frame that is\nnot required, meaning that any controls queued by the pipeline handler\nwould have their write delayed by one further frame. The original\nStaggeredCtrl did not do this, as it only had one index to manage,\nwhereas DelayedControls uses two.\n\nRemove this last no-op push so that the pipeline_handler provided\ncontrols would be written on the very next frame if possible.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReported-by: David Plowman <david.plowman@raspberrypi.com>\nFixes: 3d4b7b005911 (\"libcamera: delayed_controls: Add helper for controls that apply with a delay\")\n---\n src/libcamera/delayed_controls.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp\nindex fe2606a0d9aa..f140b4b562e7 100644\n--- a/src/libcamera/delayed_controls.cpp\n+++ b/src/libcamera/delayed_controls.cpp\n@@ -257,7 +257,7 @@ void DelayedControls::applyControls(uint32_t sequence)\n \n \twriteCount_++;\n \n-\twhile (writeCount_ >= queueCount_) {\n+\twhile (writeCount_ > queueCount_) {\n \t\tLOG(DelayedControls, Debug)\n \t\t\t<< \"Queue is empty, auto queue no-op.\";\n \t\tpush({});\n","prefixes":["libcamera-devel","4/5"]}