Patch Detail
Show a patch.
GET /api/patches/27038/?format=api
{ "id": 27038, "url": "https://patchwork.libcamera.org/api/patches/27038/?format=api", "web_url": "https://patchwork.libcamera.org/patch/27038/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260626003712.26624-2-ballen4705@googlemail.com>", "date": "2026-06-26T00:37:11", "name": "[v1,1/2] rpi: Add SensorSequence vendor control", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "d2ab06fe19bc2b0aecb23739665e61a49ff0e192", "submitter": { "id": 321, "url": "https://patchwork.libcamera.org/api/people/321/?format=api", "name": "Bruce Allen", "email": "ballen4705@googlemail.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/27038/mbox/", "series": [ { "id": 6016, "url": "https://patchwork.libcamera.org/api/series/6016/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6016", "date": "2026-06-26T00:37:10", "name": "rpi: Expose Unicam frontend sequence as SensorSequence metadata", "version": 1, "mbox": "https://patchwork.libcamera.org/series/6016/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/27038/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/27038/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 AB9EAC3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Jun 2026 00:37:19 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 73062658D1;\n\tFri, 26 Jun 2026 02:37:17 +0200 (CEST)", "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 2B704658C5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jun 2026 02:37:16 +0200 (CEST)", "by mail-wr1-x434.google.com with SMTP id\n\tffacd0b85a97d-46cacc39191so101764f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 25 Jun 2026 17:37:16 -0700 (PDT)", "from localhost.localdomain (p5ddcc513.dip0.t-ipconnect.de.\n\t[93.220.197.19]) by smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-46f0db007b3sm762055f8f.2.2026.06.25.17.37.14\n\tfor <libcamera-devel@lists.libcamera.org>\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 25 Jun 2026 17:37:15 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlemail.com header.i=@googlemail.com\n\theader.b=\"k+3J6B7L\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlemail.com; s=20251104; t=1782434236; x=1783039036;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:to:from:from:to:cc:subject:date:message-id\n\t:reply-to; bh=rWAwHULZ1wiKIxC9iBzivs8WOUmYC1Q6/xiTdP58SIg=;\n\tb=k+3J6B7LEe1vizSSa4FQJ60pH47v3FTBKbN5HDQHaR84eGW3Fa3r1rqQvdNZx2hgTT\n\t6s3lFxz3S1pOBmX2MpOw6JkfR6joRWyB/sJ2q4uO5glhWA+Rv7PSpE6VqwZND9sG8+91\n\tS6fYQVaOT5CwH0N0QHFZVADpo8h4Amgf29J27twPkDMmKDxdAFxr99tok9Qc7E9R5YF1\n\txkpgFlrGZq2WAzOEKEZ8GasyH9cfnsSo5V7FiPp+g5oy6F+lRlBExLzipJ8snvNvX29b\n\tn5lrfCoOGjN/JUSq8dhxFmQ1jxNs+fo4aPbl6pQObolURKqmPIJuM71q+pO5YNxmFrWf\n\tpbAA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1782434236; x=1783039036;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to\n\t:cc:subject:date:message-id:reply-to;\n\tbh=rWAwHULZ1wiKIxC9iBzivs8WOUmYC1Q6/xiTdP58SIg=;\n\tb=A2B5XoP2EezF9Lvq2xIz0ETUflZ91SHBMbJ/Kqgg+TdYbsnBkt4ftqiPsxlGGtfl49\n\tZTxsibrI+Vc7wI8L+qxvbZTXb9qwzlJlJcJeAyJ7Qum1E6h23J373OBL77C4dPGQgDv5\n\tprats9UrPq65xK5Uqs2IGmkMuR/yzVOC6axsA3m4OfixzgNwM2fbBTZuN3zVQZMOI4eR\n\tmMyhdDjS7KXYl1dU5t32VlT79BiSu83hyPXmoYCiZAS8TpXqYVcIfrMkn5WKuVF7bwUn\n\tFPWZWKes2D5sGjoHzHl14D4D9ftOqSsxF1SAhau5HG/EzGqP0STW6a6o450f9vSmvXD4\n\ty2Og==", "X-Gm-Message-State": "AOJu0Yzy3Kx8pYFDZ1ADN/d/i06zK7OoTT2R+cR+LBeJfFe1v3VdU9rk\n\toUCvXa8QadFjWY2TqfcNjRjVjSf/jFHfCBCw5fjRz6H+QVhazbkil+kIQOIcng==", "X-Gm-Gg": "AfdE7ckenEj57VCXB+elzA3eSW8bznN5m+k0OcfP3Y42TKDN2KgNZ54q5xPOyEmUtQ3\n\t8Cjy89srrveQPEiBy2ZdGjSMw4cJMbz2s2/kiL+tcQ7dq0GMlS1cswZ4cQvQc8zpmhR9hTGuPjS\n\tjGJKD4p7t2TUh7tQtZszRNTMu67B21MUA6H/UaU4iENOXpFR3tv3JlenoR6z0Q0guY6dw3EDAPt\n\tV/iSWoQzWHGiANugV8LUyVbqs6fAIK68UqNO7ctIis/8U6MX6qWwyK52OlItrXVEK6B5v7Naksq\n\t+zsaEXHlxNEVUVOzqc75i7uqkTae016/7G784ZG7mgj85VRC1BroniDMtaLBrNg+BN8BwbaRvi0\n\tCDKcJxBG0RDS8AI/v4dRtdtKXRde1+/Dx3YNQl4vR8sHhruCyzDKrHX/KZF4A6ChyYqiRhbeAuP\n\tt/vVzPDbUZvJWpxNjLp6Nm+GXB9Iw7V9XcRHAdMhFTmdVk4ujIGhClG18N5dmi+Stpv6x5kNPcB\n\tnqiTy3DseSHNB25", "X-Received": "by 2002:a05:6000:2904:b0:462:caf6:8d06 with SMTP id\n\tffacd0b85a97d-46a7e9f3ea0mr25572542f8f.3.1782434235674; \n\tThu, 25 Jun 2026 17:37:15 -0700 (PDT)", "From": "Bruce Allen <ballen4705@googlemail.com>", "To": "libcamera-devel@lists.libcamera.org", "Subject": "[PATCH v1 1/2] rpi: Add SensorSequence vendor control", "Date": "Fri, 26 Jun 2026 02:37:11 +0200", "Message-ID": "<20260626003712.26624-2-ballen4705@googlemail.com>", "X-Mailer": "git-send-email 2.54.0", "In-Reply-To": "<20260626003712.26624-1-ballen4705@googlemail.com>", "References": "<20260626003712.26624-1-ballen4705@googlemail.com>", "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": "Expose the Unicam frontend FrameBuffer sequence as controls::rpi::SensorSequence\n(int64_t, out) in request metadata on the VC4 pipeline.\n\nSigned-off-by: Bruce Allen <ballen4705@googlemail.com>\n---\n src/libcamera/control_ids_rpi.yaml | 11 +++++++++++\n src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 ++\n src/libcamera/pipeline/rpi/vc4/vc4.cpp | 8 +++++---\n 3 files changed, 18 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/libcamera/control_ids_rpi.yaml b/src/libcamera/control_ids_rpi.yaml\nindex 0b7da5b..5348060 100644\n--- a/src/libcamera/control_ids_rpi.yaml\n+++ b/src/libcamera/control_ids_rpi.yaml\n@@ -192,4 +192,15 @@ controls:\n just been applied. Controls normally take several frames to apply,\n so the number here will refer to a request submitted a number of\n frames earlier.\n+\n+ - SensorSequence:\n+ type: int64_t\n+ direction: out\n+ description: |\n+ Monotonic frontend/Unicam sequence number for the sensor frame.\n+\n+ Any break in this sequence number indicates that frames were not\n+ captured into the frontend stream before this request completed. This\n+ value is Raspberry Pi pipeline metadata and is intended for diagnostics\n+ of sensor-side frame continuity.\n ...\ndiff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\nindex 5a5acf6..22327bd 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n@@ -1516,6 +1516,8 @@ void CameraData::fillRequestMetadata(const ControlList &bufferControls, Request\n \t\trequest->_d()->metadata().set(controls::SensorTimestamp, *x);\n \tif (auto x = bufferControls.get(controls::FrameWallClock))\n \t\trequest->_d()->metadata().set(controls::FrameWallClock, *x);\n+\tif (auto x = bufferControls.get(controls::rpi::SensorSequence))\n+\t\trequest->_d()->metadata().set(controls::rpi::SensorSequence, *x);\n \n \tif (cropParams_.size()) {\n \t\tstd::vector<Rectangle> crops;\ndiff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\nindex 3e9a490..0f437b2 100644\n--- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n+++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n@@ -777,16 +777,18 @@ void Vc4CameraData::unicamBufferDequeue(FrameBuffer *buffer)\n \t\t */\n \t\tauto [ctrl, delayContext] = delayedCtrls_->get(buffer->metadata().sequence);\n \t\t/*\n-\t\t * Add the frame timestamp to the ControlList for the IPA to use\n-\t\t * as it does not receive the FrameBuffer object. Also derive a\n-\t\t * corresponding wallclock value.\n+\t\t * Add the frame timestamp and sequence number to the ControlList\n+\t\t * for the IPA to use as it does not receive the FrameBuffer object.\n+\t\t * Also derive a corresponding wallclock value.\n \t\t */\n \t\twallClockRecovery_.addSample();\n \t\tuint64_t sensorTimestamp = buffer->metadata().timestamp;\n \t\tuint64_t wallClockTimestamp = wallClockRecovery_.getOutput(sensorTimestamp);\n+\t\tunsigned int sensorSequence = buffer->metadata().sequence;\n \n \t\tctrl.set(controls::SensorTimestamp, sensorTimestamp);\n \t\tctrl.set(controls::FrameWallClock, wallClockTimestamp);\n+\t\tctrl.set(controls::rpi::SensorSequence, sensorSequence);\n \t\tbayerQueue_.push({ buffer, std::move(ctrl), delayContext });\n \t} else {\n \t\tembeddedQueue_.push(buffer);\n", "prefixes": [ "v1", "1/2" ] }