Show a patch.

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

{
    "id": 3385,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3385/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3385/",
    "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": "<20200404004438.17992-9-laurent.pinchart@ideasonboard.com>",
    "date": "2020-04-04T00:44:35",
    "name": "[libcamera-devel,v4,08/11] libcamera: v4l2_videodevice: Map V4L2_PIX_FMT_GREY to DRM FourCC",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "997dd83e263f9eb7e3ec00bde0d7b51037bfbf88",
    "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/3385/mbox/",
    "series": [
        {
            "id": 796,
            "url": "https://patchwork.libcamera.org/api/1.1/series/796/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=796",
            "date": "2020-04-04T00:44:27",
            "name": "Simple pipeline handler",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/796/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3385/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3385/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 E7A61629B9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  4 Apr 2020 02:44:55 +0200 (CEST)",
            "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 4ACA313C7;\n\tSat,  4 Apr 2020 02:44:55 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"IHUoYTgg\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1585961095;\n\tbh=eojVJlZ6geJjqQh0s1X8+sYEFg1dITg5+xxKxPU+w/M=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=IHUoYTggU3jvHHK42b8cs4EPOTOvVlKdsulQ2eVYjp913nRwPRSAQYy3kKQepszjd\n\tp6Nf0cSwX7RuZjHOJow9etqgw7vRX8mm6J3mESRvbXY/AY+cOPyx0qkyZwDBnKAv2D\n\t2Z/QaUV95+2VPlP/AAaZVRxjygfB6IyJnWo8dlH4=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Martijn Braam <martijn@brixit.nl>,\n\tBenjamin GAIGNARD <benjamin.gaignard@st.com>,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>",
        "Date": "Sat,  4 Apr 2020 03:44:35 +0300",
        "Message-Id": "<20200404004438.17992-9-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.24.1",
        "In-Reply-To": "<20200404004438.17992-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20200404004438.17992-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 08/11] libcamera: v4l2_videodevice: Map\n\tV4L2_PIX_FMT_GREY to DRM FourCC",
        "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": "Sat, 04 Apr 2020 00:44:56 -0000"
    },
    "content": "DRM has a format for 8-bit greyscale data, DRM_FORMAT_R8. Despite the\n'R' name, which comes from GL/Vulkan to mean single-channel data, the\nformat maps to greyscale for display. We can thus map it to\nV4L2_PIX_FMT_GREY.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\nChanges since v2:\n\n- Rebase on top of PixelFormat class\n---\n src/libcamera/v4l2_videodevice.cpp | 9 ++++++++-\n 1 file changed, 8 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex 5208e5a47148..437e771d7fe4 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -1699,12 +1699,15 @@ PixelFormat V4L2VideoDevice::toPixelFormat(V4L2PixelFormat v4l2Fourcc)\n \tcase V4L2_PIX_FMT_NV21M:\n \t\treturn PixelFormat(DRM_FORMAT_NV21);\n \n+\t/* Greyscale formats. */\n+\tcase V4L2_PIX_FMT_GREY:\n+\t\treturn PixelFormat(DRM_FORMAT_R8);\n+\n \t/* Compressed formats. */\n \tcase V4L2_PIX_FMT_MJPEG:\n \t\treturn PixelFormat(DRM_FORMAT_MJPEG);\n \n \t/* V4L2 formats not yet supported by DRM. */\n-\tcase V4L2_PIX_FMT_GREY:\n \tdefault:\n \t\t/*\n \t\t * \\todo We can't use LOG() in a static method of a Loggable\n@@ -1790,6 +1793,10 @@ V4L2PixelFormat V4L2VideoDevice::toV4L2PixelFormat(const PixelFormat &pixelForma\n \tcase DRM_FORMAT_NV21:\n \t\treturn V4L2PixelFormat(V4L2_PIX_FMT_NV21);\n \n+\t/* Greyscale formats. */\n+\tcase DRM_FORMAT_R8:\n+\t\treturn V4L2PixelFormat(V4L2_PIX_FMT_GREY);\n+\n \t/* Compressed formats. */\n \tcase DRM_FORMAT_MJPEG:\n \t\treturn V4L2PixelFormat(V4L2_PIX_FMT_MJPEG);\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "08/11"
    ]
}