Show a patch.

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

{
    "id": 10833,
    "url": "https://patchwork.libcamera.org/api/patches/10833/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10833/",
    "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": "<20210107094735.11673-2-jacopo@jmondi.org>",
    "date": "2021-01-07T09:47:26",
    "name": "[libcamera-devel,v6,01/10] libcamera: Document sensor driver requirements",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "841a6dd49633775d9afc5f7a846726ce4b5f7e7b",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": {
        "id": 15,
        "url": "https://patchwork.libcamera.org/api/users/15/?format=api",
        "username": "jmondi",
        "first_name": "Jacopo",
        "last_name": "Mondi",
        "email": "jacopo@jmondi.org"
    },
    "mbox": "https://patchwork.libcamera.org/patch/10833/mbox/",
    "series": [
        {
            "id": 1571,
            "url": "https://patchwork.libcamera.org/api/series/1571/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1571",
            "date": "2021-01-07T09:47:25",
            "name": "libcamera: camera_sensor: Make validation more strict",
            "version": 6,
            "mbox": "https://patchwork.libcamera.org/series/1571/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10833/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10833/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 89AE6C0F1A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  7 Jan 2021 09:47:27 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 65EAE63402;\n\tThu,  7 Jan 2021 10:47:27 +0100 (CET)",
            "from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net\n\t[217.70.183.199])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DAA4D60318\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  7 Jan 2021 10:47:25 +0100 (CET)",
            "from uno.localdomain (unknown [93.56.74.111])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay9-d.mail.gandi.net (Postfix) with ESMTPSA id B35B8FF808;\n\tThu,  7 Jan 2021 09:47:24 +0000 (UTC)"
        ],
        "X-Originating-IP": "93.56.74.111",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu,  7 Jan 2021 10:47:26 +0100",
        "Message-Id": "<20210107094735.11673-2-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.29.2",
        "In-Reply-To": "<20210107094735.11673-1-jacopo@jmondi.org>",
        "References": "<20210107094735.11673-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v6 01/10] libcamera: Document sensor\n\tdriver requirements",
        "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=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Document the feature an image sensor driver has to provide to be\nfully libcamera-compliant.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n Documentation/index.rst                      |  1 +\n Documentation/meson.build                    |  1 +\n Documentation/sensor_driver_requirements.rst | 64 ++++++++++++++++++++\n 3 files changed, 66 insertions(+)\n create mode 100644 Documentation/sensor_driver_requirements.rst",
    "diff": "diff --git a/Documentation/index.rst b/Documentation/index.rst\nindex c49db18d52bd..285ca7c3e5ae 100644\n--- a/Documentation/index.rst\n+++ b/Documentation/index.rst\n@@ -18,3 +18,4 @@\n    Pipeline Handler Writer's Guide <guides/pipeline-handler>\n    Tracing guide <guides/tracing>\n    Environment variables <environment_variables>\n+   Sensor driver requirements <sensor_driver_requirements>\ndiff --git a/Documentation/meson.build b/Documentation/meson.build\nindex b1f5bb52474c..9950465ded6e 100644\n--- a/Documentation/meson.build\n+++ b/Documentation/meson.build\n@@ -57,6 +57,7 @@ if sphinx.found()\n         'guides/pipeline-handler.rst',\n         'guides/tracing.rst',\n         'index.rst',\n+        'sensor_driver_requirements.rst',\n        '../README.rst',\n     ]\n \ndiff --git a/Documentation/sensor_driver_requirements.rst b/Documentation/sensor_driver_requirements.rst\nnew file mode 100644\nindex 000000000000..0e658aaa03b5\n--- /dev/null\n+++ b/Documentation/sensor_driver_requirements.rst\n@@ -0,0 +1,64 @@\n+.. SPDX-License-Identifier: CC-BY-SA-4.0\n+\n+.. _sensor-driver-requirements:\n+\n+Sensor Driver Requirements\n+==========================\n+\n+libcamera handles imaging devices in the CameraSensor class and defines\n+through its API a consistent interface towards other library components.\n+\n+The CameraSensor class uses the V4L2 subdev kernel API to interface with the\n+camera sensor through one or multiple sub-devices exposed in userspace by\n+the sensor driver.\n+\n+In order for libcamera to be fully operational and provide to applications and\n+pipeline handlers all the required information to interface with the camera\n+sensor, a set of mandatory and optional features the driver has to support\n+has been defined.\n+\n+Mandatory Requirements\n+----------------------\n+\n+The sensor driver is assumed to be fully compliant with the V4L2 specification.\n+\n+The sensor driver shall support the following V4L2 controls:\n+\n+* `V4L2_CID_HBLANK`_\n+* `V4L2_CID_PIXEL_RATE`_\n+\n+.. _V4L2_CID_HBLANK: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-image-source.html\n+.. _V4L2_CID_PIXEL_RATE: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-image-process.html\n+\n+Both controls are used to compute the sensor output timings.\n+\n+Optional Requirements\n+---------------------\n+\n+The sensor driver should support the following V4L2 controls:\n+\n+* `V4L2_CID_CAMERA_ORIENTATION`_\n+* `V4L2_CID_CAMERA_SENSOR_ROTATION`_\n+\n+.. _V4L2_CID_CAMERA_ORIENTATION: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-camera.html\n+.. _V4L2_CID_CAMERA_SENSOR_ROTATION: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-image-process.html\n+\n+The controls are used to register the camera location and orientation.\n+\n+The sensor driver should implement support for the V4L2 Selection API,\n+specifically it should implement support for the\n+`VIDIOC_SUBDEV_G_SELECTION`_ ioctl with support for the following selection\n+targets:\n+\n+.. _VIDIOC_SUBDEV_G_SELECTION: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/vidioc-subdev-g-selection.html?highlight=g_selection#c.V4L.VIDIOC_SUBDEV_G_SELECTION\n+\n+* `V4L2_SEL_TGT_CROP_BOUNDS`_ to report the readable pixel array area size\n+* `V4L2_SEL_TGT_CROP_DEFAULT`_ to report the active pixel array area size\n+* `V4L2_SEL_TGT_CROP`_ to report the analogue selection rectangle\n+\n+Support for the selection API is scheduled to become a mandatory feature in\n+the near future.\n+\n+.. _V4L2_SEL_TGT_CROP_BOUNDS: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/v4l2-selection-targets.html\n+.. _V4L2_SEL_TGT_CROP_DEFAULT: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/v4l2-selection-targets.html\n+.. _V4L2_SEL_TGT_CROP: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/v4l2-selection-targets.html\n",
    "prefixes": [
        "libcamera-devel",
        "v6",
        "01/10"
    ]
}