{"id":26277,"url":"https://patchwork.libcamera.org/api/1.1/covers/26277/?format=json","web_url":"https://patchwork.libcamera.org/cover/26277/","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":"<20260312160009.18654-1-david.plowman@raspberrypi.com>","date":"2026-03-12T15:10:37","name":"[RFC,v2,0/1] Add queueControls mechanism","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/1.1/people/42/?format=json","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"mbox":"https://patchwork.libcamera.org/cover/26277/mbox/","series":[{"id":5827,"url":"https://patchwork.libcamera.org/api/1.1/series/5827/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5827","date":"2026-03-12T15:10:37","name":"Add queueControls mechanism","version":2,"mbox":"https://patchwork.libcamera.org/series/5827/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/26277/comments/","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 9912ABE086\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Mar 2026 16:00:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A900F6262B;\n\tThu, 12 Mar 2026 17:00:16 +0100 (CET)","from mail-wr1-x434.google.com (mail-wr1-x434.google.com\n\t[IPv6:2a00:1450:4864:20::434])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2181162010\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Mar 2026 17:00:15 +0100 (CET)","by mail-wr1-x434.google.com with SMTP id\n\tffacd0b85a97d-439ce3605ecso970482f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Mar 2026 09:00:15 -0700 (PDT)","from davidp-pi5.pitowers.org\n\t([2a00:1098:3142:1f:88ea:c658:5b20:5e46])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-439fe1abf84sm9084111f8f.14.2026.03.12.09.00.13\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 12 Mar 2026 09:00:13 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"Lk61WQPh\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1773331214; x=1773936014;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=L1kt/0ZagNJFzjH/9h/xm3IFgZuTXMJgAI2PP/m63xs=;\n\tb=Lk61WQPhb/TMecm1UuMlty8NgYnSG3IVe59KE26jD2Qp7WQpDFXCpJZ3cc9rVWGZZ2\n\ttK6pL9fSiH2d4bHY0eDQBs77XYaDnQ9O6MeoOWzV9p/jnOrkrisSQIxp+24JedKLCPX+\n\twtccxR/gvVvmzi2u7QDzCpQ2P+VeK5ceMk2Iwar8mN/dWBOc5B9k/kiVvMCvcovmxtfk\n\tAwGLIFYqJ63p+cVV7tRQXd/4RXwZ0Y2vuctx2VtPb/ntAtkIgxF5u3OOf8c+6EtI/Tay\n\tbAkzDRd7iZ2AValRaHnE9pEEwSEvtGPHB1zjuxoZybDVtNW1GFQMZbp3iU3Xho6Imyuu\n\tOhNQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1773331214; x=1773936014;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=L1kt/0ZagNJFzjH/9h/xm3IFgZuTXMJgAI2PP/m63xs=;\n\tb=GJt1y7QILkHyXw4Ap91LYdnHqrco7I9ZSQ35FuX75p47CQ2WFqV+q7OZL3POuptCXO\n\tRaCbC6iemEN9hyLA7pX56Gi4zZ6q1m+icvSufPQzdjqy0mOD1eWA0OvMC4FRu7Du0kzq\n\t+rN8OzEhWO0w4fY6ftAnh9NNiKSK3q97u9QRA+ZqaZFL1uXIxEsx09I0qhAgtGcLEzB3\n\tHqFoicQtdlvrPQXOeoptaK9I3wEK8PpnxpYlhPZEdiDHf0xUSTTsKWTQINKxudYhjXwO\n\thPbre0nJCrRhI/8OlMd0qI5ilfdYbKJhYuTeNqwiG2HczcgjGHHqs5hu1/v8qCiuHSec\n\t3BbA==","X-Gm-Message-State":"AOJu0YwF/D9n4RmZwjETCzCuPBk/Ldco5Q7zFtScz3++I7vSF4NCNCPE\n\tRZymSTQ14SeyB9tfrRFNr4QJbjVQAhy0c0u8Kg3oIwmJyndHia6lp8OF/olmQRSTqULX+jLkC5S\n\tLd422zyc=","X-Gm-Gg":"ATEYQzx7OPcFSyioKGtcSSEC7K72jacEmCpJRtC02GUVHNa7+XPB6e7TOP2zlmiDuvJ\n\tCSKciE89q4bKOJpa3sRwuBUixHIGX9q6maEk2qmAYI0/EsgkyJP/uJ+LBXH6t9PdRTtQWgvLC7D\n\tgwkkFAjr9sroUT2oCdTxIWjv1t4jW9Nqsq7Vk1HdF+m3M4XVElEwd9LxrlGyg3YUK73Sgbyc0ZH\n\t5OmxBlZd73lH8oClSa++7QEbzjpBbVLzEPSoa+YUb3oq662LWJYaWzORXb+6C6GBDn5R3fpI+fB\n\t5K2PDLC7joXKt11hk8G6WfV9hRCnIm5TJS2eutZjHRpKHDI+iQuPKnLKOglCEJ1V1V+MQq7uyex\n\tlB4W+kWsniRZQptJ+oX7vyQVGVZ+6pg8uyib29EBOeEXp1WAA2HpXRsHvJ9NsE+sTCcRLD+C+EV\n\tHr5kwDnjcowndm1f7S0lqKt/0YxNir9NAsvg9uAhsH0GM6SPtJeveA0wyney6CWIgwQS9rik/q4\n\tuIQ1qxRVfbEGw+MEPN5r5SkY6oIPXJUHuIUkAA9Rw==","X-Received":"by 2002:a05:6000:310a:b0:439:b7b5:b1d1 with SMTP id\n\tffacd0b85a97d-43a04d86393mr398740f8f.18.1773331214023; \n\tThu, 12 Mar 2026 09:00:14 -0700 (PDT)","From":"David Plowman <david.plowman@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"David Plowman <david.plowman@raspberrypi.com>","Subject":"[RFC PATCH v2 0/1] Add queueControls mechanism","Date":"Thu, 12 Mar 2026 15:10:37 +0000","Message-ID":"<20260312160009.18654-1-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.47.3","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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>"},"content":"Hi everyone\n\nHere's a version of Barnabas's previous patch (hence \"v2\") that added\na separate applyControls function, to bypass the request queue. If you\nrecall, I was a fan of this one.\n\nI've re-worked it only slightly, replacing the single pending\nControlList with a queue, which is the functionality that was\nimportant to us. To make that explicit, I've renamed \"applyControls\"\nto \"queueControls\" everywhere.\n\nI've also tried, in passing, to answer some of the hanging questions:\n\n* Like requests, I've not allowed controls to be queued before the\n  camera is running. Don't feel strongly either way, really.\n\n* I've allowed queueing empty ControlLists. Doing this allows you to\n  get \"another frame like the last one\".\n\n* I clear out all pending controls when the camera stops. If an\n  application needs to be sure they have been applied, it should wait\n  (which kind of leads us on to PFC, but not a subject for this\n  patch!). Or if it doesn't want to wait, it should re-apply any\n  in-question values when it re-starts the camera.\n\n* I'm using the fallback only when the PH explicitly doesn't support\n  queueControlsDevice. Really, if it's supported it's got to work\n  every time, even if that only means putting it in a queue in the\n  PH. Having some ControlLists go into the PH here, and then to have\n  it fail and put others into the pending queue, just feels entirely\n  confusing!\n\n* In the fallback case I'm copying the ControlList so that we can\n  recover if the request fails to queue. Firstly, I don't think this\n  is too horrible, and anyway, it's a fallback. If anyone cares about\n  this they should implement queueControlsDevice.\n\nTBH, I'm a bit unconvinced by the whole fallback thing. We (RPi)\nalways queue up lots of requests as soon as we can, and to my\nunderstanding they all go through to our PH pretty much straight away,\nwhich kind of nullifies the whole point. But maybe other PHs behave\ndifferently? Always happy to be corrected on any misconceptions!\n\nThanks\nDavid\n\nDavid Plowman (1):\n  libcamera: Add independent queue for ControlLists\n\n include/libcamera/camera.h                    |  1 +\n include/libcamera/internal/camera.h           |  1 +\n include/libcamera/internal/pipeline_handler.h |  7 ++\n src/libcamera/camera.cpp                      | 61 +++++++++++++++\n src/libcamera/pipeline_handler.cpp            | 76 +++++++++++++++++++\n 5 files changed, 146 insertions(+)"}