Show a patch.

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

{
    "id": 11877,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/11877/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11877/",
    "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": "<20210409043208.1823330-4-hiroh@chromium.org>",
    "date": "2021-04-09T04:32:06",
    "name": "[libcamera-devel,RFC,3/5] libcamera: CameraSensor: Expose supported test pattern modes",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": false,
    "hash": "a18cabac60c4084c238d9466a43554b04c3bde74",
    "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/11877/mbox/",
    "series": [
        {
            "id": 1906,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1906/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1906",
            "date": "2021-04-09T04:32:03",
            "name": "Report available test pattern modes",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1906/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11877/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11877/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 760B1BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  9 Apr 2021 04:32:21 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3B5CE68804;\n\tFri,  9 Apr 2021 06:32:21 +0200 (CEST)",
            "from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com\n\t[IPv6:2607:f8b0:4864:20::52d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BA96F602CB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  9 Apr 2021 06:32:19 +0200 (CEST)",
            "by mail-pg1-x52d.google.com with SMTP id y32so2928290pga.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 08 Apr 2021 21:32:19 -0700 (PDT)",
            "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:2:7567:510e:1b47:ce92])\n\tby smtp.gmail.com with ESMTPSA id\n\til6sm737275pjb.56.2021.04.08.21.32.17\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 08 Apr 2021 21:32:17 -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=\"nlWlIpHT\"; 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=9UX/Pnfp6KSzqx9YQKtRbGf0cc/b41v8hSuDVpEZ5VE=;\n\tb=nlWlIpHTAsNy2kOGQ4xT6f6TLpH12Yc/6UxgYp9ET8O103P1fnI0yY67VaidObRCYs\n\tMwXtc4qRSTts1bN9tbQCym7lzzjo3r7kGEFHXRCoP0VLINrjWLCGG4fnCh6gwQ/V8EBM\n\t3387wpqdarjG6RU6XDkLWFqxQEy7Gcx3SI6qc=",
        "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=9UX/Pnfp6KSzqx9YQKtRbGf0cc/b41v8hSuDVpEZ5VE=;\n\tb=KIeEyIClj0zurnEidz11jirqTvgr9kG3VGpPkPH+SPsq3HkVMzwOumuhntnvVAnoh3\n\tXwXlz8ODkFYq8xh43sKVXcDY5s0Wl/TbuHswZ34SpVgyNueHAAZVDFFCAkqzsie7lbJ9\n\tbBWadF6pb66BIDBfxBSi2EpKiZpVSV90cvsda9IXxeUyH6J/YDetW5FI2DyfBgfFyV+g\n\tw9IZifw5X0MlkktbmAh53tEjUSFDz9WXlyWxYakZUoaWQLEiNVdqC06Pj3g+SXOFnEPG\n\ttB62emtSWz2quFhl2Gbvd76End9jYF6r9Qx6H+0ue5tKD09FwrCgerT+nCbxJbq7eT92\n\tWN7A==",
        "X-Gm-Message-State": "AOAM531vlSyet6dmvOMbIRXTUNePtfUkupx8WGLXKJc+4SLd+wujY2rk\n\tAgbKt+vovplIU7e8auNVzZY5gne3avrmPQ==",
        "X-Google-Smtp-Source": "ABdhPJyRLX+MBF/QHhVEObnaJ+G799UAbkWEFvFskMo7c+kOtt51EaQ4yqWSbuBfKsHFqPCtHYxT2g==",
        "X-Received": "by 2002:a63:4512:: with SMTP id\n\ts18mr11336232pga.275.1617942738282; \n\tThu, 08 Apr 2021 21:32:18 -0700 (PDT)",
        "From": "Hirokazu Honda <hiroh@chromium.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri,  9 Apr 2021 13:32:06 +0900",
        "Message-Id": "<20210409043208.1823330-4-hiroh@chromium.org>",
        "X-Mailer": "git-send-email 2.31.1.295.g9ea45b61b8-goog",
        "In-Reply-To": "<20210409043208.1823330-1-hiroh@chromium.org>",
        "References": "<20210409043208.1823330-1-hiroh@chromium.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [RFC PATCH 3/5] libcamera: CameraSensor: Expose\n\tsupported 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>",
        "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": "This adds a getter function for available test pattern modes.\nThe available test pattern modes are initialized one time on\nCameraSensor::init().\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n include/libcamera/internal/camera_sensor.h | 6 ++++++\n src/libcamera/camera_sensor.cpp            | 8 ++++++++\n 2 files changed, 14 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\nindex 3e98f71b..d924ae42 100644\n--- a/include/libcamera/internal/camera_sensor.h\n+++ b/include/libcamera/internal/camera_sensor.h\n@@ -54,6 +54,11 @@ public:\n \tconst std::vector<unsigned int> &mbusCodes() const { return mbusCodes_; }\n \tconst std::vector<Size> &sizes() const { return sizes_; }\n \tSize resolution() const;\n+\tconst std::vector<int32_t> &availableTestPatternModes() const\n+\t{\n+\t\treturn availableTestPatternModes_;\n+\t}\n+\n \n \tV4L2SubdeviceFormat getFormat(const std::vector<unsigned int> &mbusCodes,\n \t\t\t\t      const Size &size) const;\n@@ -89,6 +94,7 @@ private:\n \tV4L2Subdevice::Formats formats_;\n \tstd::vector<unsigned int> mbusCodes_;\n \tstd::vector<Size> sizes_;\n+\tstd::vector<int32_t> availableTestPatternModes_;\n \n \tSize pixelArraySize_;\n \tRectangle activeArea_;\ndiff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex f7ed91d9..fba6cb06 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -262,6 +262,8 @@ int CameraSensor::init()\n \t\t}\n \t}\n \n+\tavailableTestPatternModes_ = subdev_->getAvailableTestPatternModes();\n+\n \tret = validateSensorDriver();\n \tif (ret)\n \t\treturn ret;\n@@ -548,6 +550,12 @@ int CameraSensor::initProperties()\n  * \\return The supported frame sizes sorted in increasing order\n  */\n \n+/**\n+ * \\fn CameraSensor::availableTestPatternModes()\n+ * \\brief Retrieve the test pattern modes supported by the camera sensor\n+ * \\return The available test pattern modes.\n+ */\n+\n /**\n  * \\brief Retrieve the camera sensor resolution\n  *\n",
    "prefixes": [
        "libcamera-devel",
        "RFC",
        "3/5"
    ]
}