Show a patch.

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

{
    "id": 17944,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/17944/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17944/",
    "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": "<20221206135459.25521-2-naush@raspberrypi.com>",
    "date": "2022-12-06T13:54:47",
    "name": "[libcamera-devel,v3,01/13] libcamera: stream: Add stream hints to StreamConfiguration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "4bf835c7b68b4f87bb9fe0715faca8e155d7bf21",
    "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/17944/mbox/",
    "series": [
        {
            "id": 3659,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3659/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3659",
            "date": "2022-12-06T13:54:46",
            "name": "Raspberry Pi: Platform configuration and buffer allocation improvements",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/3659/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17944/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17944/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 5EE13BE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  6 Dec 2022 13:55:10 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 84E4C63344;\n\tTue,  6 Dec 2022 14:55:08 +0100 (CET)",
            "from mail-wm1-x336.google.com (mail-wm1-x336.google.com\n\t[IPv6:2a00:1450:4864:20::336])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8B14063331\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Dec 2022 14:55:06 +0100 (CET)",
            "by mail-wm1-x336.google.com with SMTP id l26so5001163wms.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 06 Dec 2022 05:55:06 -0800 (PST)",
            "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tq6-20020a05600c2e4600b003c6bd91caa5sm19444059wmf.17.2022.12.06.05.55.05\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 06 Dec 2022 05:55:05 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1670334908;\n\tbh=6TPR2QHCOzSmsRgML58GJeHoEheaiRbUfY1Sp25II2M=;\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:\n\tFrom;\n\tb=KL16v4OTKQbdsyFFG1C7h7javm1MuXbg8MmSN7/ntAQtvWF1GEa86JxxpN03JBMqR\n\tS3NdO8aD+TztRkTE+y7Z+PXXo1182B1y2WETl+CZPtm+44Bsb9SJ96fb/eQNlTcwrA\n\t021HBXI+klyT/GpNAHM67TtZH/wsrd/NPhQxRZ8JkLGp/YtlDuJX5WP6kOZQr8m9U/\n\tyApQHRnN6rJGbv3pPWc65xK98TtB8zM+bmKqPV6AyY8s0s4Zd4ww/eHGaZnPoXZgcV\n\tDLhOUoiTxd6vrPNR8pE2fUVBC4WK0PzYc0OVQcdEApXuHM6FGAFObkSeDru2Ax+PX1\n\tL/0vHOvU4J36w==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\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=+2T3ZLVGJwVrydTkz6iNKwj5oO6lQf9kYT88gPluNzs=;\n\tb=reTMIBefKEXPWQjKL012biBubEyT6uYfbOAGwaHBAujBYnzFsT4dDFahoobWXuN/Y5\n\tDBsZTZ+ANzOrH0Rp5qzl5qtE2BK/MGyhr9dtVie1/B23MgmtA0mu3iIc3+oPNjiEZV1Z\n\tzkJzxd6EHDbpJL18Elo2B0N9ba/n9nnKCqQseTYF35BjZRzDAlqe5VM0EdFrJ42vbYTN\n\t4rgURch2lb7GFJox1klOoACNLdIw2Ix1MuomMqZVgo9I3cpr2JlNgjt6Qf2pwMXhMH/9\n\tWFIHhiBiJIOsaNL5hzJjfCgW/zl7Zp/D8os7Wyj9I5hC4JTmu1xDqI8zUXxO/8M/uiih\n\tPV4Q=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"reTMIBef\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=+2T3ZLVGJwVrydTkz6iNKwj5oO6lQf9kYT88gPluNzs=;\n\tb=3v7Uq0ZY74B1ogyX1ld5tVHVaAC3ntp5kSE0w0Gqf8aJUweWshNDDdZ6cRzVytnE25\n\tAZYhV+ZJWqJo/Qnp/NSh4Z/NVwnrpTZrRszylHnT1dr4XvJFRBfYFd0oSxDqLnwhKjGK\n\tEOZr5P8613DTFHbx0Co3zH4AaPuQasZq6/5pgVxSPXxjP5jRuDM+qxQsHvAv74HurwI7\n\tw1gUFwA1YivzgEvaKIPBkUjC/aj50WdxH7w2S7334/z5lGRSDCx76uZUkfE2oTcxObLN\n\tEcyTsN4yLE1FmXsCCLICGa5LKtgYSIRlVDOTLeVzVJaHoRHdTTarcGvNp8s1O+G7dRbb\n\t3+2Q==",
        "X-Gm-Message-State": "ANoB5pnPwji3iTvDeATdR/t8ckgXzWKLC6urxSOSVH3IxSrwH97cLXPW\n\t4apS4j5NbWZGyVUHa2lTlAj/OeUxr+oD6L7U",
        "X-Google-Smtp-Source": "AA0mqf59LzXAMKHHcA3affymZr/l18lG6hS0wjJS7Q4FMgKlwHAuAu8C015eJvTVTi+DgEaPci9fnw==",
        "X-Received": "by 2002:a05:600c:3ba1:b0:3d0:47c:9ff5 with SMTP id\n\tn33-20020a05600c3ba100b003d0047c9ff5mr56847197wms.121.1670334905894; \n\tTue, 06 Dec 2022 05:55:05 -0800 (PST)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  6 Dec 2022 13:54:47 +0000",
        "Message-Id": "<20221206135459.25521-2-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20221206135459.25521-1-naush@raspberrypi.com>",
        "References": "<20221206135459.25521-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 01/13] libcamera: stream: Add stream\n\thints to StreamConfiguration",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a new hints flags field in the StreamConfiguration structure to allow the\napplication to specify certain intended behavior when driving libcamera.\nPipeline handlers are expected to look at these hint flags and may optimise\ninternal operations based on them.\n\nCurrently, only one flag is listed, MandatoryRequestBuffer, which the\napplication sets to guarantee that a buffer will be provided in the Request for\neach configured stream.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n include/libcamera/stream.h |  8 ++++++++\n src/libcamera/stream.cpp   | 24 ++++++++++++++++++++++++\n 2 files changed, 32 insertions(+)",
    "diff": "diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\nindex 29235ddf0d8a..1c5273004297 100644\n--- a/include/libcamera/stream.h\n+++ b/include/libcamera/stream.h\n@@ -13,6 +13,8 @@\n #include <string>\n #include <vector>\n \n+#include <libcamera/base/flags.h>\n+\n #include <libcamera/color_space.h>\n #include <libcamera/framebuffer.h>\n #include <libcamera/geometry.h>\n@@ -51,6 +53,12 @@ struct StreamConfiguration {\n \n \tstd::optional<ColorSpace> colorSpace;\n \n+\tenum class Hint {\n+\t\tNone = 0,\n+\t\tMandatoryRequestBuffer = (1 << 0),\n+\t};\n+\tFlags<Hint> hints;\n+\n \tStream *stream() const { return stream_; }\n \tvoid setStream(Stream *stream) { stream_ = stream; }\n \tconst StreamFormats &formats() const { return formats_; }\ndiff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\nindex 67f308157fbf..504c6d86cd04 100644\n--- a/src/libcamera/stream.cpp\n+++ b/src/libcamera/stream.cpp\n@@ -349,6 +349,30 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)\n  * color spaces can be supported and in what combinations.\n  */\n \n+/**\n+ * \\enum StreamConfiguration::Hint\n+ * \\brief List of available hint flags provided by the application for a stream\n+ *\n+ * \\var StreamConfiguration::Hint::None\n+ * No hints for this stream.\n+ * \\var StreamConfiguration::Hint::MandatoryRequestBuffer\n+ * Informs the pipeline handler that the application guarantee to provide a\n+ * buffer for the configured stream in the Request. This may allow the pipeline\n+ * handler to allocate fewer (or no) buffers for internal use.\n+ */\n+\n+/**\n+ * \\var StreamConfiguration::hints\n+ * \\brief Application provided StreamConfiguration::Hint flags for specific\n+ * stream behavior\n+ *\n+ * Provides hints from the application to the pipeline handlers on how it\n+ * intends on handling a given configured stream. These hints may alter the\n+ * behavior of the pipeline handlers, for example, by allocating fewer buffers\n+ * for internal use if an application guarantees to always provide a buffer in\n+ * the Request for a stream.\n+ */\n+\n /**\n  * \\fn StreamConfiguration::stream()\n  * \\brief Retrieve the stream associated with the configuration\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "01/13"
    ]
}