Show a patch.

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

{
    "id": 3082,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3082/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3082/",
    "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": "<20200309180444.725757-6-jacopo@jmondi.org>",
    "date": "2020-03-09T18:04:43",
    "name": "[libcamera-devel,v3,5/6] libcamera: sensor: Add OV5670 camera sensor",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "efda1ad0c5ccd4bf3437ed4071a328ecc54b975b",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3082/mbox/",
    "series": [
        {
            "id": 717,
            "url": "https://patchwork.libcamera.org/api/1.1/series/717/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=717",
            "date": "2020-03-09T18:04:38",
            "name": "Camera properties and camera sensor factory",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/717/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3082/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3082/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B9C9562923\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Mar 2020 19:02:10 +0100 (CET)",
            "from uno.lan (93-34-114-233.ip49.fastwebnet.it [93.34.114.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 2118E4000C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Mar 2020 18:02:09 +0000 (UTC)"
        ],
        "X-Originating-IP": "93.34.114.233",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon,  9 Mar 2020 19:04:43 +0100",
        "Message-Id": "<20200309180444.725757-6-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.25.0",
        "In-Reply-To": "<20200309180444.725757-1-jacopo@jmondi.org>",
        "References": "<20200309180444.725757-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 5/6] libcamera: sensor: Add OV5670\n\tcamera sensor",
        "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": "Mon, 09 Mar 2020 18:02:11 -0000"
    },
    "content": "Add OV5670CameraSensor class to handle Omnivision OV5670 image sensor\nand register it to the camera sensor factory and initialize its pixel\narray properties by overriding CameraSensor::initProperties() method.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\n---\nv2 -> v3:\n- Squash class introduction and patches registration\n- Update to use the new properties names\n---\n src/libcamera/meson.build        |  1 +\n src/libcamera/sensor/meson.build |  3 ++\n src/libcamera/sensor/ov5670.cpp  | 60 ++++++++++++++++++++++++++++++++\n 3 files changed, 64 insertions(+)\n create mode 100644 src/libcamera/sensor/meson.build\n create mode 100644 src/libcamera/sensor/ov5670.cpp",
    "diff": "diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 87fa09cde63d..358c784baa20 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -57,6 +57,7 @@ includes = [\n \n subdir('pipeline')\n subdir('proxy')\n+subdir('sensor')\n \n libatomic = cc.find_library('atomic', required : false)\n libdl = cc.find_library('dl')\ndiff --git a/src/libcamera/sensor/meson.build b/src/libcamera/sensor/meson.build\nnew file mode 100644\nindex 000000000000..7af70370cf5c\n--- /dev/null\n+++ b/src/libcamera/sensor/meson.build\n@@ -0,0 +1,3 @@\n+libcamera_sources += files([\n+    'ov5670.cpp',\n+])\ndiff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp\nnew file mode 100644\nindex 000000000000..a027a0816e58\n--- /dev/null\n+++ b/src/libcamera/sensor/ov5670.cpp\n@@ -0,0 +1,60 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2020, Google Inc.\n+ *\n+ * ov5670.cpp - OV5670 camera sensor\n+ */\n+\n+#include <libcamera/property_ids.h>\n+\n+#include \"camera_sensor.h\"\n+\n+/**\n+ * \\file ov5670.cpp\n+ * \\brief Omnivision OV5670 image sensor\n+ */\n+\n+namespace libcamera {\n+\n+class OV5670 final : public CameraSensor\n+{\n+public:\n+\tOV5670(const MediaEntity *entity);\n+\tint initProperties();\n+};\n+\n+/**\n+ * \\class OV5670\n+ * \\brief Camera sensor class for Omnivision OV5670 image sensor\n+ */\n+\n+/**\n+ * \\brief Construct the ov5670 sensor class\n+ * \\param[in] entity The media entity representing the sensor\n+ */\n+OV5670::OV5670(const MediaEntity *entity)\n+\t: CameraSensor(entity)\n+{\n+}\n+\n+/**\n+ * \\brief Initialize Camera properties with ov5670 specific values\n+ * \\return 0 on success, a negative error code otherwise\n+ */\n+int OV5670::initProperties()\n+{\n+\t/* Pixel Array Properties. */\n+\tproperties_.set(properties::PixelArraySize, { 2.9457f, 2.214f });\n+\tproperties_.set(properties::PixelArrayBounds, { 2592, 1944 });\n+\tproperties_.set(properties::PixelArrays, { 2592, 1944 });\n+\tproperties_.set(properties::ActiveAreaSizes, { 16, 6, 2560, 1920 });\n+\tproperties_.set(properties::BayerFilterArrangement,\n+\t\t\tproperties::BayerFilterGRBG);\n+\tproperties_.set(properties::ISOSensitivityRange, { 50, 800 });\n+\n+\treturn CameraSensor::initProperties();\n+}\n+\n+REGISTER_CAMERA_SENSOR(OV5670, \"ov5670\");\n+\n+}; /* namespace libcamera */\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "5/6"
    ]
}