Show a patch.

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

{
    "id": 12202,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/12202/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/12202/",
    "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": "<20210506075449.1761752-4-hiroh@chromium.org>",
    "date": "2021-05-06T07:54:46",
    "name": "[libcamera-devel,v4,3/6] libcamera: CameraSensorProperties: Adds table of v4l2 index and test pattern",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "b5cd9e57ad3b35eb5798f89a048c8c793d67d275",
    "submitter": {
        "id": 63,
        "url": "https://patchwork.libcamera.org/api/1.1/people/63/?format=api",
        "name": "Hirokazu Honda",
        "email": "hiroh@chromium.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/12202/mbox/",
    "series": [
        {
            "id": 2001,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2001/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2001",
            "date": "2021-05-06T07:54:43",
            "name": "[libcamera-devel,v4,1/6] libcamera: controls: Add sensor test pattern mode",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/2001/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/12202/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/12202/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 E6CDFBDE7F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  6 May 2021 07:55:04 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9414D68909;\n\tThu,  6 May 2021 09:55:04 +0200 (CEST)",
            "from mail-pf1-x434.google.com (mail-pf1-x434.google.com\n\t[IPv6:2607:f8b0:4864:20::434])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1656B68918\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  6 May 2021 09:55:02 +0200 (CEST)",
            "by mail-pf1-x434.google.com with SMTP id b15so4540834pfl.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 06 May 2021 00:55:02 -0700 (PDT)",
            "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:2:ede4:ae0e:d4a4:c0d3])\n\tby smtp.gmail.com with ESMTPSA id\n\tf201sm1355546pfa.133.2021.05.06.00.54.59\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 06 May 2021 00:54:59 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"NxtnGyfG\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=xpgFNDTtg0oyYyVSA6cWMojJgJgBPhdh7V3DPsi5GIo=;\n\tb=NxtnGyfGIOgIKSdR8ZmFOK89xpSRUM7RwlepHtQI5IkA+EpvZT4QEHPx70dfZv2PUC\n\tEKi8RiSAb3trFhSE0uV3gOvNjRig+d8WPg4K93FQt6xvSKQa5tfGMDYKkANdfre5Iex/\n\tnKE6lfCrn6jxTkoSNO5pPIpFwo5lBLWKsdPO0=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=xpgFNDTtg0oyYyVSA6cWMojJgJgBPhdh7V3DPsi5GIo=;\n\tb=sHgIS5Ev+u4Bvy1ebbxOOOGIW2D2w1cZNkeoxk73dD51fxcQYWV7VJxK8rvUjvUnrO\n\t6QGLHMBiHG3Eh+rHMue7TLAEWvkkyuM8o4ERqsoDzqCLPvFPg82eEGiplW05c878FBxN\n\tT5zgAvsamTE8xVww6eS3VJKZauSQ+UKqOU0i+jrzZ5OtlZ9/i0Ifhf7qVBp/qGRwcz2I\n\tXtNVR56yJI81AEAJmpeIHz9OC4uaoKUq7+cu8BLHPAi0aXDvfxyqZG6aObsqBCdn907I\n\tV4/pxHSLsuTIvv05VQYENFpnPHBe7uEqgQEirassgB1WHgpUu+9O9k4Mlk/xvBh5/HpB\n\t4Wvg==",
        "X-Gm-Message-State": "AOAM531geyC8NeKfMf0jmEBi7IHlkTiNAOrcg+m/9tubFOHh/una4oOH\n\teuBZ45t5wNM/t3+f5Sja/cYvlRSFfurVIA==",
        "X-Google-Smtp-Source": "ABdhPJyu/GvUJdO/bo1NfPHM9Wmcuxo8xUZvXY6qbHxNKDslFXB4KyzSALLY1zr1uZw4aAbyO9j6MQ==",
        "X-Received": "by 2002:a05:6a00:1588:b029:272:f5b1:c96c with SMTP id\n\tu8-20020a056a001588b0290272f5b1c96cmr3212239pfk.47.1620287700320; \n\tThu, 06 May 2021 00:55:00 -0700 (PDT)",
        "From": "Hirokazu Honda <hiroh@chromium.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu,  6 May 2021 16:54:46 +0900",
        "Message-Id": "<20210506075449.1761752-4-hiroh@chromium.org>",
        "X-Mailer": "git-send-email 2.31.1.607.g51e8a6a459-goog",
        "In-Reply-To": "<20210506075449.1761752-1-hiroh@chromium.org>",
        "References": "<20210506075449.1761752-1-hiroh@chromium.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v4 3/6] libcamera: CameraSensorProperties:\n\tAdds table of v4l2 index and test pattern",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "In V4L2 API, a driver returns an index (also with a name) to\nrepresent a test pattern, but it is a driver specific what test\npattern is represented by the index. Therefore, this adds a\nmapping table from the index and a test pattern into a static\nconfiguration of a sensor.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n .../internal/camera_sensor_properties.h       |  2 ++\n src/libcamera/camera_sensor_properties.cpp    | 20 +++++++++++++++++++\n 2 files changed, 22 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h\nindex f5e242cb..f52890b4 100644\n--- a/include/libcamera/internal/camera_sensor_properties.h\n+++ b/include/libcamera/internal/camera_sensor_properties.h\n@@ -7,6 +7,7 @@\n #ifndef __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__\n #define __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__\n \n+#include <map>\n #include <string>\n \n #include <libcamera/geometry.h>\n@@ -17,6 +18,7 @@ struct CameraSensorProperties {\n \tstatic const CameraSensorProperties *get(const std::string &sensor);\n \n \tSize unitCellSize;\n+\tstd::map<int32_t, int32_t> testPatternModeMap;\n };\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp\nindex 6ded31dc..89eaf9f8 100644\n--- a/src/libcamera/camera_sensor_properties.cpp\n+++ b/src/libcamera/camera_sensor_properties.cpp\n@@ -9,6 +9,8 @@\n \n #include <map>\n \n+#include <libcamera/control_ids.h>\n+\n #include \"libcamera/internal/log.h\"\n \n /**\n@@ -44,15 +46,33 @@ LOG_DEFINE_CATEGORY(CameraSensorProperties)\n  */\n const CameraSensorProperties *CameraSensorProperties::get(const std::string &sensor)\n {\n+\n \tstatic const std::map<std::string, const CameraSensorProperties> sensorProps = {\n \t\t{ \"imx219\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n+\t\t\t.testPatternModeMap = {\n+\t\t\t\t{ 0, controls::draft::TestPatternModeOff },\n+\t\t\t\t{ 1, controls::draft::TestPatternModeColorBars },\n+\t\t\t\t{ 2, controls::draft::TestPatternModeSolidColor },\n+\t\t\t\t{ 3, controls::draft::TestPatternModeColorBarsFadeToGray },\n+\t\t\t\t{ 4, controls::draft::TestPatternModePn9 },\n+\t\t\t},\n \t\t} },\n \t\t{ \"ov5670\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n+\t\t\t.testPatternModeMap = {\n+\t\t\t\t{ 0, controls::draft::TestPatternModeOff },\n+\t\t\t\t{ 1, controls::draft::TestPatternModeColorBars },\n+\t\t\t},\n+\n \t\t} },\n \t\t{ \"ov13858\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n+\t\t\t.testPatternModeMap =  {\n+\t\t\t\t{ 0, controls::draft::TestPatternModeOff },\n+\t\t\t\t{ 1, controls::draft::TestPatternModeColorBars },\n+\t\t\t\t{ 2, controls::draft::TestPatternModeColorBarsFadeToGray },\n+\t\t\t},\n \t\t} },\n \t};\n \n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "3/6"
    ]
}