Show a patch.

GET /api/patches/22216/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 22216,
    "url": "https://patchwork.libcamera.org/api/patches/22216/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22216/",
    "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": "<20241206142742.7931-6-david.plowman@raspberrypi.com>",
    "date": "2024-12-06T14:27:42",
    "name": "[5/5] pipeline: rpi: vc4: Add wallclock timestamp support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "dcfb1140967f8814f3a49e81b81ed8754261b5e9",
    "submitter": {
        "id": 42,
        "url": "https://patchwork.libcamera.org/api/people/42/?format=api",
        "name": "David Plowman",
        "email": "david.plowman@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22216/mbox/",
    "series": [
        {
            "id": 4856,
            "url": "https://patchwork.libcamera.org/api/series/4856/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4856",
            "date": "2024-12-06T14:27:37",
            "name": "Implement wallclock timestamps for frames",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4856/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22216/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22216/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 B7DF2BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 Dec 2024 14:27:59 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A737F67E19;\n\tFri,  6 Dec 2024 15:27:54 +0100 (CET)",
            "from mail-wr1-x433.google.com (mail-wr1-x433.google.com\n\t[IPv6:2a00:1450:4864:20::433])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 145DF66159\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Dec 2024 15:27:49 +0100 (CET)",
            "by mail-wr1-x433.google.com with SMTP id\n\tffacd0b85a97d-3862f32a33eso214222f8f.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 06 Dec 2024 06:27:49 -0800 (PST)",
            "from localhost.localdomain ([88.202.252.90])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-386220b071dsm4608219f8f.101.2024.12.06.06.27.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 06 Dec 2024 06:27:48 -0800 (PST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"JrGxnO9r\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1733495268; x=1734100068;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=RwXAjeZBjmTaRhBl0Lt3tdMya7DG8/0UHFFSELomyPA=;\n\tb=JrGxnO9r8vRtVXtg38yr2OjKSNeIt3ZJvFUJdmE6aIy9KPd3v/f/OjVvns90uwcgvg\n\tD7Eub6ePOrNK5/EnLhULASxLLsLeqWCNIfifbLfs+IKgFwIbYf+wQfxEea3FF1udn0+A\n\tZ3hmEgYXj61kiLHSEI2q+o8JKBKg3vuLCWiXm7ru/SDSW8KThuyUW6Z2fSdHFZIRZ07i\n\t46tQWpSI4dGalTeLTMctFlNeGKifZvS7zQxH3gn7A+V7QG9qYOlOO+GETb1zJG0OTd9P\n\tkhRyuEL1Kg4fLA+vDbfrEmKU4QL7eyAdkbdcok7Sp/DQ+tTUtpnQKy8Shj9XbiKoxbtH\n\t1wjg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1733495268; x=1734100068;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=RwXAjeZBjmTaRhBl0Lt3tdMya7DG8/0UHFFSELomyPA=;\n\tb=WSdg6iZXVy3J9b7TjTLXld8yeHLeneAWWjsGmg7YwE/TaGhDUAuuezsQ0rgqPNW5Zu\n\tyW8aEFpr37ptB9v27a8gKJ33s5F/S232+CxN4kzd/SU1dQxdmHKsDYGKw731FHNuKEFB\n\tgC3iUyPGbR2gMQC5F1wWqQSKVrRNMiWKJHYvxxoi+2HNZVNOztfUqZgIk6e4uGx6alfr\n\tvzU8t3LAkXEJ3hHnSv6GV2ldKjstBFwj9hEvxWyf+x8Kq2ttFHBqxMRMM2utqHfxMGy9\n\tsvc1DHaE6BrmtX6WopYf9g7xD3e11EUiSGwSyzlGCouTuUMGBxTW/I55kqzB0W2Du5kN\n\t4l5w==",
        "X-Gm-Message-State": "AOJu0YwmzAAJLBb5kO44DdU3k4saGI1Rjr9IqgyvG9LXZUg46qmbZIiY\n\tm2H8MqIZDDW0eSO6zkyZKSz3WP8vf4g6uLG8l3c75/XAqfChEuCwNf92rWz/l7nCMD8JvakACND\n\ty",
        "X-Gm-Gg": "ASbGnctY0Zo2fdh8YSMeOnr1QVxkqMMQy7VKPDVcrN7QBq/C28N911f3DpeyBY7GR6C\n\tU72ZquUAmm0lP3X4tspOabgXx9D7ngCZm/5sWKLRPKRrttlQEoGjqQiyH1Gt9vc/BgUQKvePxTu\n\tZnqeSAZq6ZcE3TOLUMRgZbYep4Pakd7cqET6MZas3BZXJd9RHQ5WkVSRAqd321jwNeS+uIUCMdR\n\t3miHTzm92Oe4Q4iI/NFYY98KzIiiLh5/SUhc1uihnkWwS3Ar78V3dgShHI7x1PSTBtKpU+QTLc=",
        "X-Google-Smtp-Source": "AGHT+IH8m0qAB5srEnDm2xrQP0MnazAqKbyVam/9EjJQdOZ2r57U+05ysS8jVb3A9UpRysrUN/UL9w==",
        "X-Received": "by 2002:a05:6000:1fa4:b0:385:f677:8594 with SMTP id\n\tffacd0b85a97d-3862b3e5d6dmr2562804f8f.43.1733495268327; \n\tFri, 06 Dec 2024 06:27:48 -0800 (PST)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "David Plowman <david.plowman@raspberrypi.com>",
        "Subject": "[PATCH 5/5] pipeline: rpi: vc4: Add wallclock timestamp support",
        "Date": "Fri,  6 Dec 2024 14:27:42 +0000",
        "Message-Id": "<20241206142742.7931-6-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.39.5",
        "In-Reply-To": "<20241206142742.7931-1-david.plowman@raspberrypi.com>",
        "References": "<20241206142742.7931-1-david.plowman@raspberrypi.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": "Wallclocks are enabled for the unicam output, and the values returned\nin frame metadata are made available to the base pipeline handler\nclass.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/libcamera/pipeline/rpi/vc4/vc4.cpp | 4 ++++\n 1 file changed, 4 insertions(+)",
    "diff": "diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\nindex fd8d84b1..eb98c56e 100644\n--- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n+++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n@@ -398,6 +398,9 @@ int PipelineHandlerVc4::platformRegister(std::unique_ptr<RPi::CameraData> &camer\n \t\tCamera::create(std::move(cameraData), id, streams);\n \tPipelineHandler::registerCamera(std::move(camera));\n \n+\t/* Enable wall clock timestamps for the unicam output. */\n+\tdata->unicam_[Unicam::Image].dev()->enableWallClock(&wallClockRecoery_);\n+\n \tLOG(RPI, Info) << \"Registered camera \" << id\n \t\t       << \" to Unicam device \" << unicam->deviceNode()\n \t\t       << \" and ISP device \" << isp->deviceNode();\n@@ -784,6 +787,7 @@ void Vc4CameraData::unicamBufferDequeue(FrameBuffer *buffer)\n \t\t * as it does not receive the FrameBuffer object.\n \t\t */\n \t\tctrl.set(controls::SensorTimestamp, buffer->metadata().timestamp);\n+\t\tctrl.set(controls::FrameWallClock, buffer->metadata().wallClock);\n \t\tbayerQueue_.push({ buffer, std::move(ctrl), delayContext });\n \t} else {\n \t\tembeddedQueue_.push(buffer);\n",
    "prefixes": [
        "5/5"
    ]
}