Show a patch.

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

{
    "id": 20811,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/20811/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20811/",
    "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": "<20240807080344.12780-2-naush@raspberrypi.com>",
    "date": "2024-08-07T08:03:43",
    "name": "[v1,1/2] libcamera: formats: Adding Support for Y12P",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": false,
    "hash": "a59fe7406a9aadf144ca97bc1cb3ece6aa6c4e72",
    "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/20811/mbox/",
    "series": [
        {
            "id": 4492,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4492/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4492",
            "date": "2024-08-07T08:03:42",
            "name": "Raspberrypi: Add support for IMX585",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4492/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20811/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20811/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 9BC54BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  7 Aug 2024 08:03:46 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 47D7263393;\n\tWed,  7 Aug 2024 10:03:44 +0200 (CEST)",
            "from mail-lj1-x229.google.com (mail-lj1-x229.google.com\n\t[IPv6:2a00:1450:4864:20::229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B217461946\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  7 Aug 2024 10:03:42 +0200 (CEST)",
            "by mail-lj1-x229.google.com with SMTP id\n\t38308e7fff4ca-2f025b94e07so17009261fa.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 07 Aug 2024 01:03:42 -0700 (PDT)",
            "from naush-laptop.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-42905961e9dsm16403005e9.8.2024.08.07.01.03.40\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 07 Aug 2024 01:03:40 -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=\"hZtL1JLv\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1723017822; x=1723622622;\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=BNeV+Mfh0xbbAy8/qvUjwm5fxs31OnXjJZpMfecEHuQ=;\n\tb=hZtL1JLvv2J0hgKixFIyuObMubM2S69Td+pILEzz6uOI7/pH+N+u6rHekHziBj+p/Z\n\tZYWqLZcjLfm3lTfvl1KruC7VnvlV6/Ew+vIqhDziswXyHfrMotIh/z69cQA5j6DUmXuq\n\tnV0/Jj4TWDd9emPWe9Vb7NgzVg8tta9p2hAO0G+qeaFMF8zpnIwd0DBtPZ1Jo8FxpBWm\n\toiIlVk+vg4Ydj0c//ZlFyKjayzu0LDfonKAmZUhLzfeYmV56CdwXcudnsEe3wrgjslK/\n\tf9wym3s+MukVx7IPWxgP8ed/bBKG8ucSuFR038ilgydkur8wGl7fKJPEm30a6bbRg1Om\n\tYVYQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1723017822; x=1723622622;\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=BNeV+Mfh0xbbAy8/qvUjwm5fxs31OnXjJZpMfecEHuQ=;\n\tb=XRqGExnFKy7tFN1UyLs7BCXYBicmXndxsOgDTQIPMbCuubUJtqmQu0klFG218PJD4q\n\tGEc6UP/hBMwnD2WaxmektAJC85S0fHcGPwmcCDw6o6r6mTQH7w4LKC8Rr18tzPRIxC1h\n\tklAe6JoNcUe5xf53Fkvg2skPJioUseTslclq2iZ+mzYprNkR7nNtlqiVEpHEpIlN6SoI\n\tGHZtJB1lK8V5mxiyJytwzzQlFRpRYHJPPUtQ/2g+LMIbie2qxpOn5BOAY5+AajMISyCD\n\tWVltbFUDixxllXgOrRmwdDKBDtc24gIIyusTBX7518Wk9q8ivOXWTDUIVQ3Cw3neQ7I9\n\tpfBQ==",
        "X-Gm-Message-State": "AOJu0YxOuIWwDak6dx0VOXUD3IHw0FzrBY2CoyiZo22v6Dk1OUVZE5+/\n\tjtYrjNW9KUuTUrf6LOrWy/Lunh8qNtEqMwqYGVssiQrg/CN/mS3Xb92agn5ZyAenRuffNL+u/fK\n\ta",
        "X-Google-Smtp-Source": "AGHT+IEkbseO5r64PERv21oR01rHjwoB7x/6hFWBfOb1c+Wt6i7QaAG5SyB8ydPRYoAF/5q/xQtT6Q==",
        "X-Received": "by 2002:a2e:8718:0:b0:2ef:20ae:d111 with SMTP id\n\t38308e7fff4ca-2f15aa85f82mr123791301fa.6.1723017821339; \n\tWed, 07 Aug 2024 01:03:41 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "will whang <will@willwhang.com>, Naushir Patuck <naush@raspberrypi.com>",
        "Subject": "[PATCH v1 1/2] libcamera: formats: Adding Support for Y12P",
        "Date": "Wed,  7 Aug 2024 09:03:43 +0100",
        "Message-Id": "<20240807080344.12780-2-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240807080344.12780-1-naush@raspberrypi.com>",
        "References": "<20240807080344.12780-1-naush@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: will whang <will@willwhang.com>\n\nAdd support for the 12-bit Mono (V4L2_PIX_FMT_Y12P) format.\nThis format is used by the IMX585 mono sensor.\n\nSigned-off-by: will whang <will@willwhang.com>\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/bayer_format.cpp     |  2 ++\n src/libcamera/formats.cpp          | 10 ++++++++++\n src/libcamera/formats.yaml         |  3 +++\n src/libcamera/v4l2_pixelformat.cpp |  2 ++\n 4 files changed, 17 insertions(+)",
    "diff": "diff --git a/src/libcamera/bayer_format.cpp b/src/libcamera/bayer_format.cpp\nindex 014f716d28f7..c2120d1c16d7 100644\n--- a/src/libcamera/bayer_format.cpp\n+++ b/src/libcamera/bayer_format.cpp\n@@ -184,6 +184,8 @@ const std::map<BayerFormat, Formats, BayerFormatComparator> bayerToFormat{\n \t\t{ formats::R10_CSI2P, V4L2PixelFormat(V4L2_PIX_FMT_Y10P) } },\n \t{ { BayerFormat::MONO, 12, BayerFormat::Packing::None },\n \t\t{ formats::R12, V4L2PixelFormat(V4L2_PIX_FMT_Y12) } },\n+\t{ { BayerFormat::MONO, 12, BayerFormat::Packing::CSI2 },\n+\t\t{ formats::R12_CSI2P, V4L2PixelFormat(V4L2_PIX_FMT_Y12P) } },\n \t{ { BayerFormat::MONO, 16, BayerFormat::Packing::None },\n \t\t{ formats::R16, V4L2PixelFormat(V4L2_PIX_FMT_Y16) } },\n \t{ { BayerFormat::MONO, 16, BayerFormat::Packing::PISP1 },\ndiff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\nindex cf41f2c261ed..f338fc373f33 100644\n--- a/src/libcamera/formats.cpp\n+++ b/src/libcamera/formats.cpp\n@@ -527,6 +527,16 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t\t.pixelsPerGroup = 4,\n \t\t.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},\n \t} },\n+\t{ formats::R12_CSI2P, {\n+\t\t.name = \"R12_CSI2P\",\n+\t\t.format = formats::R12_CSI2P,\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_Y12P), },\n+\t\t.bitsPerPixel = 12,\n+\t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n+\t\t.packed = true,\n+\t\t.pixelsPerGroup = 2,\n+\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n+\t} },\n \t{ formats::R12, {\n \t\t.name = \"R12\",\n \t\t.format = formats::R12,\ndiff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml\nindex fe027a7cce70..2d54d391ca01 100644\n--- a/src/libcamera/formats.yaml\n+++ b/src/libcamera/formats.yaml\n@@ -138,6 +138,9 @@ formats:\n   - R10_CSI2P:\n       fourcc: DRM_FORMAT_R10\n       mod: MIPI_FORMAT_MOD_CSI2_PACKED\n+  - R12_CSI2P:\n+      fourcc: DRM_FORMAT_R12\n+      mod: MIPI_FORMAT_MOD_CSI2_PACKED\n \n   - SRGGB10_CSI2P:\n       fourcc: DRM_FORMAT_SRGGB10\ndiff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\nindex 70568335b266..eb9ac2224fd1 100644\n--- a/src/libcamera/v4l2_pixelformat.cpp\n+++ b/src/libcamera/v4l2_pixelformat.cpp\n@@ -139,6 +139,8 @@ const std::map<V4L2PixelFormat, V4L2PixelFormat::Info> vpf2pf{\n \t\t{ formats::R10_CSI2P, \"10-bit Greyscale Packed\" } },\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_Y12),\n \t\t{ formats::R12, \"12-bit Greyscale\" } },\n+\t{ V4L2PixelFormat(V4L2_PIX_FMT_Y12P),\n+\t\t{ formats::R12_CSI2P, \"12-bit Greyscale Packed\" } },\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_Y16),\n \t\t{ formats::R16, \"16-bit Greyscale\" } },\n \n",
    "prefixes": [
        "v1",
        "1/2"
    ]
}