Show a patch.

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

{
    "id": 3085,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3085/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3085/",
    "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": "<20200313233856.25202-2-laurent.pinchart@ideasonboard.com>",
    "date": "2020-03-13T23:38:49",
    "name": "[libcamera-devel,1/8,DNI] include: linux: Extend VIDIOC_ENUM_FMT to support MC-centric devices",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "44d4a77c1eca041c9fc0896f48f8d19c312b356d",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3085/mbox/",
    "series": [
        {
            "id": 718,
            "url": "https://patchwork.libcamera.org/api/1.1/series/718/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=718",
            "date": "2020-03-13T23:38:48",
            "name": "Simple pipeline handler",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/718/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3085/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3085/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A87A62826\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 14 Mar 2020 00:39:05 +0100 (CET)",
            "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CD92312F3;\n\tSat, 14 Mar 2020 00:39:04 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584142745;\n\tbh=OuYSMq66Kicl43m1yxRxpkunkmtmaYs0y8lU4TFqw5o=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=rs8l8kZMPN1CoyFTJJd26RgqBEt2MuHlI6bpF5HNferBXfdqPxbhw+sAw6AzoRotI\n\tHBdUR43977TI9YUAwaFY3VIy62bS2KLeFGMJ/TpdHTl5EW+Sn58YTtyKtkQKTw96tX\n\txsEAgNxKXRDN6Tqp6m5eIkk3yJom2vrSm1Ohkroc=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Martijn Braam <martijn@brixit.nl>,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>,\n\tMickael GUENE <mickael.guene@st.com>,\n\tBenjamin GAIGNARD <benjamin.gaignard@st.com>",
        "Date": "Sat, 14 Mar 2020 01:38:49 +0200",
        "Message-Id": "<20200313233856.25202-2-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.24.1",
        "In-Reply-To": "<20200313233856.25202-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20200313233856.25202-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 1/8] [DNI] include: linux: Extend\n\tVIDIOC_ENUM_FMT to support MC-centric devices",
        "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>",
        "X-List-Received-Date": "Fri, 13 Mar 2020 23:39:05 -0000"
    },
    "content": "This is an experimental change that hasn't been accepted in mainline\nyet. Its commit message for the Linux kernel is as follows.\n\nmedia: v4l2: Extend VIDIOC_ENUM_FMT to support MC-centric devices\n\nThe VIDIOC_ENUM_FMT ioctl enumerates all formats supported by a video\nnode. For MC-centric devices, its behaviour has always been ill-defined,\nwith drivers implementing one of the following behaviours:\n\n- No support for VIDIOC_ENUM_FMT at all\n- Enumerating all formats supported by the video node, regardless of the\n  configuration of the pipeline\n- Enumerating formats supported by the video node for the active\n  configuration of the connected subdevice\n\nThe first behaviour is obviously useless for applications. The second\nbehaviour provides the most information, but doesn't offer a way to find\nwhat formats are compatible with a given pipeline configuration. The\nthird behaviour fixes that, but with the drawback that applications\ncan't enumerate all supported formats anymore, and have to modify the\nactive configuration of the pipeline to enumerate formats.\n\nThe situation is messy as none of the implemented behaviours are ideal,\nand userspace can't predict what will happen as the behaviour is\ndriver-specific.\n\nTo fix this, let's extend the VIDIOC_ENUM_FMT with a missing capability:\nenumerating pixel formats for a given media bus code. The media bus code\nis passed through the v4l2_fmtdesc structure in a new mbus_code field\n(repurposed from the reserved fields), and an additional flag is added\nto report if the driver supports this API extension. With this\ncapability in place, applications can enumerate pixel formats for a\ngiven media bus code without modifying the active configuration of the\ndevice.\n\nThe current behaviour of the ioctl is preserved when the new mbus_code\nfield is set to 0, ensuring compatibility with existing userspace. This\nbehaviour is now documented as mandatory for MC-centric devices as well\nas the traditional video node-centric devices. This allows applications\nto query MC-centric devices for all the supported pixel formats, as well\nas for the pixel formats corresponding to a given media bus code.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/linux/videodev2.h | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h\nindex ab40b3272ed2..120130c4aaae 100644\n--- a/include/linux/videodev2.h\n+++ b/include/linux/videodev2.h\n@@ -769,13 +769,15 @@ struct v4l2_fmtdesc {\n \t__u32               flags;\n \t__u8\t\t    description[32];   /* Description string */\n \t__u32\t\t    pixelformat;       /* Format fourcc      */\n-\t__u32\t\t    reserved[4];\n+\t__u32\t\t    mbus_code;\t\t/* Media bus code    */\n+\t__u32\t\t    reserved[3];\n };\n \n #define V4L2_FMT_FLAG_COMPRESSED\t\t0x0001\n #define V4L2_FMT_FLAG_EMULATED\t\t\t0x0002\n #define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM\t0x0004\n #define V4L2_FMT_FLAG_DYN_RESOLUTION\t\t0x0008\n+#define V4L2_FMT_FLAG_MBUS_CODE\t\t\t0x0010\n \n \t/* Frame Size and frame rate enumeration */\n /*\n",
    "prefixes": [
        "libcamera-devel",
        "1/8",
        "DNI"
    ]
}