Show a patch.

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

{
    "id": 21514,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/21514/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/21514/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20241004115558.9166-4-david.plowman@raspberrypi.com>",
    "date": "2024-10-04T11:55:55",
    "name": "[3/6] pipelien: rpi: vc4: Populate the wallclock timestamps queue",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "1dda7c706f9bb009a47ffa05614f1379f06ba05d",
    "submitter": {
        "id": 42,
        "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api",
        "name": "David Plowman",
        "email": "david.plowman@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/21514/mbox/",
    "series": [
        {
            "id": 4658,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4658/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4658",
            "date": "2024-10-04T11:55:52",
            "name": "Raspberry Pi software camera sync algorithm",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4658/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/21514/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/21514/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 D2293BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  4 Oct 2024 11:56:16 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2CCD36352B;\n\tFri,  4 Oct 2024 13:56:16 +0200 (CEST)",
            "from mail-wr1-x431.google.com (mail-wr1-x431.google.com\n\t[IPv6:2a00:1450:4864:20::431])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 69B0B6352B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  4 Oct 2024 13:56:05 +0200 (CEST)",
            "by mail-wr1-x431.google.com with SMTP id\n\tffacd0b85a97d-37cd8a5aac9so1204579f8f.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 04 Oct 2024 04:56:05 -0700 (PDT)",
            "from raspberrypi.pitowers.org\n\t([2a00:1098:3142:1f:daa2:371b:a97:3e3e])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-37d081f743esm3107147f8f.21.2024.10.04.04.56.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 04 Oct 2024 04:56:03 -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=\"Z8bxFDNN\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1728042964; x=1728647764;\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=lxFKq/MpaE936mX2wEmbFqI5SPb5I+EyRyQlidCho7Q=;\n\tb=Z8bxFDNNBqM2QpxyKXH8c5K1HnKfVs47cvuJGPlfLYq9dIqt1291w7eX17k4wsNGmz\n\tRfs7IwsfA5egFRW6fO1w4nbCXGtyRTYkDCnzlQ3jsq8wq+eDgqyTWM0SL82HCoUDhTdA\n\tSaqWoJkG7Isnse2XsAhe8R/Ffbob9WOIW1cjPNMAUOBhSVJ9Z1azL67Y1d1R78vc746A\n\tqU9X1blScKYLgEGANW8CtJOAUJCKP1yl726+9pPhU46mU8kOYyACZOWs/EH96aZRJTZv\n\t0M1YpLK9TJ2qodG/zeDZ9USu0sfgL86peb5E2x9F8dxiYThWh22cls1QYnGFaE4u2UT/\n\togiQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1728042964; x=1728647764;\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=lxFKq/MpaE936mX2wEmbFqI5SPb5I+EyRyQlidCho7Q=;\n\tb=MSYGdzsO7heLDg9VTvxofGltWT1BkwUI0IPHIq78LLqkby0x4o4JHWwMvl0G9EIPZ4\n\tQwT0xWnxNwIz2SIWZLKTmJPMBhqrWzinrQFq68sh7pvKPWEL+B6a42Pg7hZ2sCVXYo6g\n\tAGDd99zfuCFpSP1xr23F7hY1E0AEkhKjaRVC7fP7Fz5Z3byyzB8nTc1WrCji26D/jhV1\n\tQDDwK8zLeN8NDFxk+0a+cQ6WSn9y+HlEwTFwjO37bRE1PVFaP0WaAkqkUpNc2eSgWP56\n\tmN+LXdi2eEAeHre4CyMIjSniEvqmm/Tj98shNI10HJgWOAwvQqbLeH1peXb5oFcpA11f\n\ty5Hg==",
        "X-Gm-Message-State": "AOJu0Yw0OO9Udb9EnsYwa23ZqB0/QpyKRL2IBUFIW1nw/abKwxKuNV3C\n\tRs5VIGXV7hNqKWa8ap0p43ZjyQIpvkj3G9kFuTLf6T4uWdStE9TtLPbBFg3WVAQjGRy6ScvqyQy\n\tA",
        "X-Google-Smtp-Source": "AGHT+IHsc4JYwDumkCtd0Xc0FYqSHhljBWcmdw9FUfXMHgHhFQ5MHX8WgKG8u3MzrMa+STV7MYAsFQ==",
        "X-Received": "by 2002:a5d:4e45:0:b0:374:c0c5:3c05 with SMTP id\n\tffacd0b85a97d-37d0e7baf3fmr1409348f8f.42.1728042964037; \n\tFri, 04 Oct 2024 04:56:04 -0700 (PDT)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Naushir Patuck <naush@raspberrypi.com>",
        "Subject": "[PATCH 3/6] pipelien: rpi: vc4: Populate the wallclock timestamps\n\tqueue",
        "Date": "Fri,  4 Oct 2024 12:55:55 +0100",
        "Message-Id": "<20241004115558.9166-4-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.39.5",
        "In-Reply-To": "<20241004115558.9166-1-david.plowman@raspberrypi.com>",
        "References": "<20241004115558.9166-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": "From: Naushir Patuck <naush@raspberrypi.com>\n\nWe add wallclock timestamps to the queue when we dequeue a camera\nbuffer from Unicam.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/rpi/vc4/vc4.cpp | 12 ++++++++++++\n 1 file changed, 12 insertions(+)",
    "diff": "diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\nindex e5b6ef2b..754cfdde 100644\n--- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n+++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n@@ -777,6 +777,18 @@ 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+\n+\t\t/* Also record a wall-clock timestamp that can be passed to IPAs. */\n+\t\twhile (!frameWallClock_.empty() &&\n+\t\t       frameWallClock_.front().first < buffer->metadata().sequence)\n+\t\t\tframeWallClock_.pop();\n+\n+\t\tif (!frameWallClock_.empty() &&\n+\t\t    frameWallClock_.front().first == buffer->metadata().sequence) {\n+\t\t\tctrl.set(controls::rpi::FrameWallClock, frameWallClock_.front().second.get<std::micro>());\n+\t\t\tframeWallClock_.pop();\n+\t\t}\n+\n \t\tbayerQueue_.push({ buffer, std::move(ctrl), delayContext });\n \t} else {\n \t\tembeddedQueue_.push(buffer);\n",
    "prefixes": [
        "3/6"
    ]
}