Show a patch.

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

{
    "id": 12550,
    "url": "https://patchwork.libcamera.org/api/patches/12550/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/12550/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20210610082539.529739-6-hiroh@chromium.org>",
    "date": "2021-06-10T08:25:39",
    "name": "[libcamera-devel,v8,6/6] android: CameraDevice: Report queried test pattern modes",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "06df6e463ad2e9b5cf063b70bbea7e68417c3e80",
    "submitter": {
        "id": 63,
        "url": "https://patchwork.libcamera.org/api/people/63/?format=api",
        "name": "Hirokazu Honda",
        "email": "hiroh@chromium.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/12550/mbox/",
    "series": [
        {
            "id": 2117,
            "url": "https://patchwork.libcamera.org/api/series/2117/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2117",
            "date": "2021-06-10T08:25:34",
            "name": "[libcamera-devel,v8,1/6] libcamera: controls: Add sensor test pattern mode",
            "version": 8,
            "mbox": "https://patchwork.libcamera.org/series/2117/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/12550/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/12550/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 8DE80BD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 10 Jun 2021 08:25:56 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4FA636893C;\n\tThu, 10 Jun 2021 10:25:56 +0200 (CEST)",
            "from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com\n\t[IPv6:2607:f8b0:4864:20::1029])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 782036892B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 10 Jun 2021 10:25:55 +0200 (CEST)",
            "by mail-pj1-x1029.google.com with SMTP id\n\tpi6-20020a17090b1e46b029015cec51d7cdso3344676pjb.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 10 Jun 2021 01:25:55 -0700 (PDT)",
            "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:98e0:b356:1c8a:25d4])\n\tby smtp.gmail.com with ESMTPSA id\n\tx3sm2087011pgx.8.2021.06.10.01.25.52\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 10 Jun 2021 01:25:53 -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=\"YqSm8Tfj\"; 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=hqu8pksEUVvipvwGZ2F8p2REk5PKW/IuLTrKzsk2/go=;\n\tb=YqSm8Tfj31Q0ZUfDA/Cho8VWPsxwTZOtjFYj9mFpHZLSCjtciO9BYH+HNdLCzNKUJg\n\tl8QfUVefjGnTrcEYse9OFtUipTF3Ydj7EwrGzkgMUam/qsh4LvUkdWh9gfjCwjWXl23E\n\tdRgepoSlGwbxCX8HgH0ZXP/8OVUlkop8Yp1GU=",
        "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=hqu8pksEUVvipvwGZ2F8p2REk5PKW/IuLTrKzsk2/go=;\n\tb=o+GWM1247SGif4Hk3Qvm4he3Lu1BPDTON4j4oZohiumuD3nZcdG6ejf9DwXFoJ6lAa\n\t8Wo/DDt5nGTvWRu3d7s70K1ZR/9nIIQtVKFOI7dvQyf9uWT0vmi+54+8n9ZoZe1kAu31\n\trEeyLm4mRiTwWIswcaaeGoyNAVAD+DG6SKhuieBvpQ87k7c1w+TeFfYZJYFTcVJwZMaU\n\tg05muSaxRU3nvpVyCxC5Q8PEbcGwVVKjT7mgaOHiIu4PC5jnft7QUqOQR/zQCDp2c3Mx\n\tjd+espVKJ14BwayHOWZcM2pTu3us/7VzMRfLly+soabiguNJ55SXbVLWs1w0nBnmGwSj\n\to8gA==",
        "X-Gm-Message-State": "AOAM530Huv+BePpgrWN0VqUYY3VIpQHCqqIDznFrVj8Rf6PFqJlI1MyU\n\tCisZ4OyIyzBm7jF9ur/1e4ZDZARuH1FgSw==",
        "X-Google-Smtp-Source": "ABdhPJyLJkXyTLorQLVPedHxehln6bwneeZ+Og6hz/GvWtlyGpg/DOQbQC1TtcJ7S2dZL32pwcTu1Q==",
        "X-Received": "by 2002:a17:90a:6a8d:: with SMTP id\n\tu13mr2184443pjj.55.1623313553870; \n\tThu, 10 Jun 2021 01:25:53 -0700 (PDT)",
        "From": "Hirokazu Honda <hiroh@chromium.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 10 Jun 2021 17:25:39 +0900",
        "Message-Id": "<20210610082539.529739-6-hiroh@chromium.org>",
        "X-Mailer": "git-send-email 2.32.0.rc1.229.g3e70b5a671-goog",
        "In-Reply-To": "<20210610082539.529739-1-hiroh@chromium.org>",
        "References": "<20210610082539.529739-1-hiroh@chromium.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v8 6/6] android: CameraDevice: Report\n\tqueried test pattern modes",
        "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": "Report to the Android camera stack the list of supported test\npattern modes constructed by inspecting the values reported\nby libcamera through the controls::draft::TestPatternMode control.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/camera_device.cpp | 51 ++++++++++++++++++++++++++++++++---\n 1 file changed, 48 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex fe332ec3..5e961003 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -1083,11 +1083,56 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n \n \tstaticMetadata_->addEntry(ANDROID_SENSOR_ORIENTATION, orientation_);\n \n-\tstd::vector<int32_t> testPatterModes = {\n-\t\tANDROID_SENSOR_TEST_PATTERN_MODE_OFF,\n+\tstd::vector<int32_t> testPatternModes = {\n+\t\tANDROID_SENSOR_TEST_PATTERN_MODE_OFF\n \t};\n+\tconst auto &testPatternsInfo =\n+\t\tcontrolsInfo.find(&controls::draft::TestPatternMode);\n+\tif (testPatternsInfo != controlsInfo.end()) {\n+\t\tconst auto &values = testPatternsInfo->second.values();\n+\t\tASSERT(!values.empty());\n+\t\tfor (const auto &value : values) {\n+\t\t\tswitch (value.get<int32_t>()) {\n+\t\t\tcase controls::draft::TestPatternModeOff:\n+\t\t\t\t/*\n+\t\t\t\t * ANDROID_SENSOR_TEST_PATTERN_MODE_OFF is\n+\t\t\t\t * already in testPatternModes.\n+\t\t\t\t */\n+\t\t\t\tbreak;\n+\n+\t\t\tcase controls::draft::TestPatternModeSolidColor:\n+\t\t\t\ttestPatternModes.push_back(\n+\t\t\t\t\tANDROID_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR);\n+\t\t\t\tbreak;\n+\n+\t\t\tcase controls::draft::TestPatternModeColorBars:\n+\t\t\t\ttestPatternModes.push_back(\n+\t\t\t\t\tANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS);\n+\t\t\t\tbreak;\n+\n+\t\t\tcase controls::draft::TestPatternModeColorBarsFadeToGray:\n+\t\t\t\ttestPatternModes.push_back(\n+\t\t\t\t\tANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY);\n+\t\t\t\tbreak;\n+\n+\t\t\tcase controls::draft::TestPatternModePn9:\n+\t\t\t\ttestPatternModes.push_back(\n+\t\t\t\t\tANDROID_SENSOR_TEST_PATTERN_MODE_PN9);\n+\t\t\t\tbreak;\n+\n+\t\t\tcase controls::draft::TestPatternModeCustom1:\n+\t\t\t\t/* We don't support this yet. */\n+\t\t\t\tbreak;\n+\n+\t\t\tdefault:\n+\t\t\t\tLOG(HAL, Error) << \"Unknown test pattern mode: \"\n+\t\t\t\t\t\t<< value.get<int32_t>();\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\t\t}\n+\t}\n \tstaticMetadata_->addEntry(ANDROID_SENSOR_AVAILABLE_TEST_PATTERN_MODES,\n-\t\t\t\t  testPatterModes);\n+\t\t\t\t  testPatternModes);\n \n \tuint8_t timestampSource = ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN;\n \tstaticMetadata_->addEntry(ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE,\n",
    "prefixes": [
        "libcamera-devel",
        "v8",
        "6/6"
    ]
}