Show a patch.

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

{
    "id": 19126,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/19126/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19126/",
    "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": "<20231013074841.16972-3-naush@raspberrypi.com>",
    "date": "2023-10-13T07:48:23",
    "name": "[libcamera-devel,v2,02/20] pipeline: rpi: Add Recurrent and Needs32bitConv flags to RPi::Stream",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "96b1a1629687ab8ecc0b5f5881a75d81d2e40c42",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/19126/mbox/",
    "series": [
        {
            "id": 4049,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4049/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4049",
            "date": "2023-10-13T07:48:21",
            "name": "Raspberry Pi: Preliminary PiSP support",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4049/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19126/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19126/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 83CB1C32B6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Oct 2023 07:48:53 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 44BB562980;\n\tFri, 13 Oct 2023 09:48:52 +0200 (CEST)",
            "from mail-wm1-x331.google.com (mail-wm1-x331.google.com\n\t[IPv6:2a00:1450:4864:20::331])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 13E2D6295F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Oct 2023 09:48:49 +0200 (CEST)",
            "by mail-wm1-x331.google.com with SMTP id\n\t5b1f17b1804b1-40666aa674fso18809525e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Oct 2023 00:48:49 -0700 (PDT)",
            "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tm16-20020a7bca50000000b003fee6e170f9sm1791890wml.45.2023.10.13.00.48.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 13 Oct 2023 00:48:47 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1697183332;\n\tbh=vpTMwsBE85smJGdnV8ufWU9wfac7cA+9jg3yj6jEfFA=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=VKPECP8UnI1HLqytkisiCh94dSW5KcCi/Lv01uGcn7sZ56C3gT2fMar8cax3EXSU1\n\tgJGjwdn9r8JeThXmyt9kcBxk5NdITS2OE6DMsJ2vuXVZDFq+RziTiSnWwaORoWEsC0\n\t0uYPBQd1dffUMuGewosf6rVLZxl0vnCcWD4zmZjnX9RKprOjSFhq7gG5GHPo0rOyzH\n\tsKmFEoitjVXbzPbUCrnW0biEVAfYqPjzaRAOF8rEgLDt5ulD118H6bOZV097XK7W33\n\tbgm8lAIG+tCN7M8Y3MGejLbCiJXiu/HFJJdyCczCXVbatHtssOdjj92PgpbbbrdV6u\n\tHdaPPZXfYKOug==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1697183328; x=1697788128;\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=kn40iwxfpZOODJIPAGAfiw/6Gmd7I0zdgzH/m35HEcM=;\n\tb=LsHm5uIIHM0MVRz6SJklchnLRhqoqvlXqkNqojWyw+OFrrbJCVQfxtkn2eU1KwLwks\n\tsGHzGgEEZSzmqOUt/N3DHaFX0SaHq9fAsa8Myqzd6uWtCgf76FcHYjTnBKzmn+iJM9WO\n\tU1N7y5Skn0qJAlQZNvdKJZISOsl3zpBbyk7LViYdP1YnkZh/izUVkSRqA5rL4jvyRipC\n\tPRtHu2qI9XBKnkEipQ8EL8RX75//u/W2JzJfxebGBkB0/Ctep6WJQ/PqswSf+PgwagV9\n\tHOuMJ2BgFuc6ZiGPoMDomIAvUGPxBhNNJ4giWjhelB/aCAJali2SFVS9HvfqJH3L/icq\n\tuVGw=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"LsHm5uII\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1697183328; x=1697788128;\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=kn40iwxfpZOODJIPAGAfiw/6Gmd7I0zdgzH/m35HEcM=;\n\tb=LuXn2Mb6M2/BaMT7USowMR3IHlI2A7/hG+DPi4tP4Wy/AtzqKleSjLx0DLJ3wxLEtk\n\tDpPswrqj3Svh7bhPQtohMj+fDUKcZ+UmPNkXmK6+jXsK7QVUKjkYd+/ZhkUeaLHxBO/A\n\tUhASzn4uk6F6t88FNAT/BOdAIVfZxy7zqwH2WB1Mf7EMpzWr0sn+us4uesm7LaLjIAsF\n\tP8qSn/WBmUK3wPsJ6m64MvYsFokz9q93GBrkXlWJc+enUH+YTPRmYxm0hRsk4V8rPrbJ\n\tDQSsXc8/sh+rYdtpbzdr16LAAdLlgusJQmqwn2zSBn78uk7b6z8adocWypB6cQj8R215\n\tAJhQ==",
        "X-Gm-Message-State": "AOJu0YxBz+GeXo2IVbUmvshmUSAm2YJEjQ2PjRgcMaQ2o1uOD2WvJfh/\n\trvrg7I9flHBbiOlIfP6pNQCIpKDCz3oH6xiISnsfdA==",
        "X-Google-Smtp-Source": "AGHT+IHsFi1NnQ6MrltLBpCb6Fiw2Ia74S36Woz8SA2HMpfCC9wQEYOQyCQG0iVYeCpKekqwmNMCdw==",
        "X-Received": "by 2002:a1c:7914:0:b0:405:37bb:d942 with SMTP id\n\tl20-20020a1c7914000000b0040537bbd942mr23917932wme.4.1697183328243; \n\tFri, 13 Oct 2023 00:48:48 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 13 Oct 2023 08:48:23 +0100",
        "Message-Id": "<20231013074841.16972-3-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20231013074841.16972-1-naush@raspberrypi.com>",
        "References": "<20231013074841.16972-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 02/20] pipeline: rpi: Add Recurrent and\n\tNeeds32bitConv flags to RPi::Stream",
        "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>",
        "From": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Naushir Patuck <naush@raspberrypi.com>",
        "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a new \"Recurrent\" stream flag. This flag indicates the stream buffer\nhandling/management happend from the pipeline handler exclusively. This\nis used for TDN/Stitch and Config streams.\n\nAdd a new Needs32bitConv stream flag to indicate that this stream needs\na software postprocessing conversion run on it before returning out to\nthe application.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/libcamera/pipeline/rpi/common/rpi_stream.cpp |  4 ++--\n src/libcamera/pipeline/rpi/common/rpi_stream.h   | 11 +++++++++++\n 2 files changed, 13 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\nindex ee827a86b06a..20864aeed2d1 100644\n--- a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n+++ b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n@@ -155,7 +155,7 @@ int Stream::queueBuffer(FrameBuffer *buffer)\n \n void Stream::returnBuffer(FrameBuffer *buffer)\n {\n-\tif (!(flags_ & StreamFlag::External)) {\n+\tif (!(flags_ & StreamFlag::External) && !(flags_ & StreamFlag::Recurrent)) {\n \t\t/* For internal buffers, simply requeue back to the device. */\n \t\tqueueToDevice(buffer);\n \t\treturn;\n@@ -217,7 +217,7 @@ int Stream::queueAllBuffers()\n {\n \tint ret;\n \n-\tif (flags_ & StreamFlag::External)\n+\tif ((flags_ & StreamFlag::External) || (flags_ & StreamFlag::Recurrent))\n \t\treturn 0;\n \n \twhile (!availableBuffers_.empty()) {\ndiff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.h b/src/libcamera/pipeline/rpi/common/rpi_stream.h\nindex 861e9c8e7dab..c5e35d134926 100644\n--- a/src/libcamera/pipeline/rpi/common/rpi_stream.h\n+++ b/src/libcamera/pipeline/rpi/common/rpi_stream.h\n@@ -70,6 +70,17 @@ public:\n \t\t * to the pipeline handler when requested.\n \t\t */\n \t\tRequiresMmap\t= (1 << 2),\n+\t\t/*\n+\t\t * Indicates a stream that needs buffers recycled every frame internally\n+\t\t * in the pipeline handler, e.g. stitch, TDN, config. All buffer\n+\t\t * management will be handled by the pipeline handler.\n+\t\t */\n+\t\tRecurrent\t= (1 << 3),\n+\t\t/*\n+\t\t * Indicates that the output stream needs a software format conversion\n+\t\t * to be applied after ISP processing.\n+\t\t */\n+\t\tNeeds32bitConv\t= (1 << 4),\n \t};\n \n \tusing StreamFlags = Flags<StreamFlag>;\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "02/20"
    ]
}