From patchwork Tue Mar 24 14:32:06 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 26323 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 DEA78BE086 for ; Tue, 24 Mar 2026 15:17:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A12666278D; Tue, 24 Mar 2026 16:17:19 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Ii7U1ODB"; dkim-atps=neutral Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6FECE6277D for ; Tue, 24 Mar 2026 16:17:18 +0100 (CET) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-48700b1ba53so38827055e9.1 for ; Tue, 24 Mar 2026 08:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1774365438; x=1774970238; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6P1OoAghNOyMY+X7TP1yP3CyIFzqYNOXRRPOeczLjo0=; b=Ii7U1ODBUdj3gJ5waAp22z0a2TAmFBhRYxFMCyMCUIJCWv1qoYL2009PNcIli9M3RB ydQ+qWgxLFnaKtZvVB/E0agFES7UKUTaKQ39lat7Fwepepr53S41wG6lCgOKjh3FHq2A En6mzkOT2vRubGtWY8+UEDVBbZeyeT6TRejupFDw+9rKayFp1wKnUSsEUVo72mHlV1Ll N8mBZmQwCtMZBgpBvsvGx1sY4NtksxnbmsCN++77qj9YTGlPVAQRRXjU7zqMUIjIAl2z vHmIj+ybP7eW2cQYCpYtBdPJV1sGVQ7sEgGLS18906AnvM4tIk/gwEvuUNM71MAkCK4D 5KQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774365438; x=1774970238; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6P1OoAghNOyMY+X7TP1yP3CyIFzqYNOXRRPOeczLjo0=; b=aD41TuYHYlvIU8iYKNp982ve3BYLVy70K3IfIIEiGxb/IhrFBuB1/jOZR2y0Q9DHgN baBO2gfJVicfmPRgPdya66b++O1TqIqzr60SsnfA9yQ87guA6EKR3Te9/xSFF1j4ZznE I532l1l93qcD2u+rHxKrjNVj8Wa+bj5vrLPRLOdPrsHRjpGIDSpirwnGo7FExo53F6j4 tnTzrjatg18lbx6z+fDw+uOVjAYeioV70sdGmwk4fYEYyRufUxNQqvWvtJI1SgyJd3ID +M8XauFCXxUvaFsLqczINgVdmk+ZvmV+kSuKAidpeI9Djy5L6Ct39/Knx4lHZ5Zu/sx6 75hQ== X-Gm-Message-State: AOJu0YyZTe0yc6NYEsbJ3/0JP3pD8B8iBK6+7M/UqDtCgdCGo6JZrlHg sjs3VrODVxOR9UD0MIbYlzNCYvRO5wTsrePJ+qgfESh7b20hh5CaG+0YkhiRQEMMsZo6LS2DXDo xlncN X-Gm-Gg: ATEYQzwssoCupRI73/x97ONb68CCobt6s7lUSLJnvdtJ96IdTW/r6+V8zjC9dZY53E+ fGGykzERG8hHOy0h2pAO7U5XuUlF2YGANVnHvf4SRvHj55l4BmYcPTsP3yFQ9JwAjvvsQNlMKsK qsNT6xV7w+812nWPyfjwG7t53OcrWsnv7G9XLQfJb/nd8zI+e0KmVmBAwcz3IHJZSGK7TxGUOjS DX7mxyODW1t1bG2zRSW4yjuVMbqczjdYAk/fP3nCdDdc4xEWB329PEUYX0fIiKDqywSDMVT0sfN dULXdKJKCQAt6vK46MfkxZnmsAHZ4FYtQDaRMvSP5MD1MguhdX8+/6XeskCNSmDdMkh/wwk1gVx ty3pPbCpP+mxiNrIFyDhqgZ6ixcD+Zpzips9LA7X4eoYYgepQflyPW6CQ59Xuz52lR0Od6Pwmau FBg4sLmpAKkgwkp2PO3dfVx+H911EzF/zvIbBUbzkuCHvAhfZo9MaTPKhi3cghrUeiBR/rmwQT+ EkPgGLv/5GfjyoXCBvbduiQAacsagy887sW39TABQ== X-Received: by 2002:a05:600c:4644:b0:485:2fe9:336f with SMTP id 5b1f17b1804b1-4871607e225mr1166895e9.30.1774365437562; Tue, 24 Mar 2026 08:17:17 -0700 (PDT) Received: from davidp-pi5.pitowers.org ([2a00:1098:3142:1f:88ea:c658:5b20:5e46]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-487116c44bfsm63826065e9.9.2026.03.24.08.17.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2026 08:17:17 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Cc: David Plowman Subject: [PATCH v1 0/3] Atomic control lists on Raspberry Pi Date: Tue, 24 Mar 2026 14:32:06 +0000 Message-ID: <20260324151714.3345-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.47.3 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" Hi Currently, on Raspberry Pi, when control lists are submitted in a request, they are not all applied on the same frame. "Immediate" (or ISP controls) can be applied instantly, and will therefore happen several frames before the "delayed" controls (like exposure time, analogue gain and so on which require us to wait for the sensor). This small patch set fixes that by holding back the immediate controls, until the delayed controls submitted in the same request, have happened. As we already have the necessary information, we can also flag every request with the sequence number of the request whose control list has actually just been applied, which we do using the "ControlId" metadata. This first patch is some tidying that came out of doing this work, but is not otherwise terribly significant (beyond being correct or not!). The second patch defines the "ControlId" control, and the final patch contains the bulk of the changes. Thanks! David David Plowman (3): pipeline: rpi: Simplify delayed controls controls: rpi: Add ControlId control pipeline: rpi: Make control lists in requests properly atomic src/ipa/rpi/common/ipa_base.cpp | 24 ++++++---- src/libcamera/control_ids_rpi.yaml | 10 ++++ .../pipeline/rpi/common/delayed_controls.cpp | 22 ++++----- .../pipeline/rpi/common/delayed_controls.h | 1 - .../pipeline/rpi/common/pipeline_base.cpp | 46 +++++++++++++++++++ .../pipeline/rpi/common/pipeline_base.h | 8 ++++ src/libcamera/pipeline/rpi/pisp/pisp.cpp | 3 ++ src/libcamera/pipeline/rpi/vc4/vc4.cpp | 3 ++ 8 files changed, 96 insertions(+), 21 deletions(-)