Show a patch.

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

{
    "id": 3716,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3716/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3716/",
    "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": "<20200508100158.3437161-6-jacopo@jmondi.org>",
    "date": "2020-05-08T10:01:50",
    "name": "[libcamera-devel,v10,05/13] media: v4l2-ctrl: Document V4L2_CID_CAMERA_SENSOR_ROTATION",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "1c8b844812eb6754ba3aecaf618174d4cc55fb71",
    "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/3716/mbox/",
    "series": [
        {
            "id": 888,
            "url": "https://patchwork.libcamera.org/api/1.1/series/888/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=888",
            "date": "2020-05-08T10:01:45",
            "name": "media: report camera properties",
            "version": 10,
            "mbox": "https://patchwork.libcamera.org/series/888/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3716/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3716/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "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 4E4EF603E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  8 May 2020 11:59:14 +0200 (CEST)",
            "from localhost.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 90DFBFF804;\n\tFri,  8 May 2020 09:59:10 +0000 (UTC)"
        ],
        "X-Originating-IP": "2.224.242.101",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "linux-media@vger.kernel.org (open list:MEDIA INPUT INFRASTRUCTURE\n\t(V4L/DVB)), libcamera-devel@lists.libcamera.org,\n\tMauro Carvalho Chehab <mchehab@kernel.org>,\n\tHans Verkuil <hverkuil-cisco@xs4all.nl>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Cc": "Jacopo Mondi <jacopo@jmondi.org>,\n\ttfiga@google.com,\n\tpavel@ucw.cz",
        "Date": "Fri,  8 May 2020 12:01:50 +0200",
        "Message-Id": "<20200508100158.3437161-6-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.26.1",
        "In-Reply-To": "<20200508100158.3437161-1-jacopo@jmondi.org>",
        "References": "<20200508100158.3437161-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v10 05/13] media: v4l2-ctrl: Document\n\tV4L2_CID_CAMERA_SENSOR_ROTATION",
        "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": "Fri, 08 May 2020 09:59:14 -0000"
    },
    "content": "Add documentation for the V4L2_CID_CAMERA_SENSOR_ROTATION camera\ncontrol. The newly added read-only control reports the rotation\ncorrection to be applied to images before displaying them to the user.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n .../media/v4l/ext-ctrls-camera.rst            | 121 ++++++++++++++++++\n 1 file changed, 121 insertions(+)",
    "diff": "diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst\nindex 01e104bab6b3d..6b618f3b51bf1 100644\n--- a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst\n+++ b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst\n@@ -540,6 +540,127 @@ enum v4l2_scene_mode -\n \n \n \n+``V4L2_CID_CAMERA_SENSOR_ROTATION (integer)``\n+    This read-only control describes the rotation correction in degrees in the\n+    counter-clockwise direction to be applied to the captured images once\n+    captured to memory to compensate for the camera sensor mounting rotation.\n+\n+    For a precise definition of the sensor mounting rotation refer to the\n+    extensive description of the 'rotation' properties in the device tree\n+    bindings file 'video-interfaces.txt'.\n+\n+    A few examples are below reported, using a shark swimming from left to\n+    right in front of the user as the example scene to capture. ::\n+\n+                 0               X-axis\n+               0 +------------------------------------->\n+                 !\n+                 !\n+                 !\n+                 !           |\\____)\\___\n+                 !           ) _____  __`<\n+                 !           |/     )/\n+                 !\n+                 !\n+                 !\n+                 V\n+               Y-axis\n+\n+    Example one - Webcam\n+\n+    Assuming you can bring your laptop with you while swimming with sharks,\n+    the camera module of the laptop is installed on the user facing part of a\n+    laptop screen casing, and is typically used for video calls. The captured\n+    images are meant to be displayed in landscape mode (width > height) on the\n+    laptop screen.\n+\n+    The camera is typically mounted upside-down to compensate the lens optical\n+    inversion effect. In this case the value of the\n+    V4L2_CID_CAMERA_SENSOR_ROTATION control is 0, no rotation is required to\n+    display images correctly to the user.\n+\n+    If the camera sensor is not mounted upside-down it is required to compensate\n+    the lens optical inversion effect and the value of the\n+    V4L2_CID_CAMERA_SENSOR_ROTATION control is 180 degrees, as images will\n+    result rotated when captured to memory. ::\n+\n+                 +--------------------------------------+\n+                 !                                      !\n+                 !                                      !\n+                 !                                      !\n+                 !              __/(_____/|             !\n+                 !            >.___  ____ (             !\n+                 !                 \\(    \\|             !\n+                 !                                      !\n+                 !                                      !\n+                 !                                      !\n+                 +--------------------------------------+\n+\n+    A software rotation correction of 180 degrees has to be applied to correctly\n+    display the image on the user screen. ::\n+\n+                 +--------------------------------------+\n+                 !                                      !\n+                 !                                      !\n+                 !                                      !\n+                 !             |\\____)\\___              !\n+                 !             ) _____  __`<            !\n+                 !             |/     )/                !\n+                 !                                      !\n+                 !                                      !\n+                 !                                      !\n+                 +--------------------------------------+\n+\n+    Example two - Phone camera\n+\n+    It is more handy to go and swim with sharks with only your mobile phone\n+    with you and take pictures with the camera that is installed on the back\n+    side of the device, facing away from the user. The captured images are meant\n+    to be displayed in portrait mode (height > width) to match the device screen\n+    orientation and the device usage orientation used when taking the picture.\n+\n+    The camera sensor is typically mounted with its pixel array longer side\n+    aligned to the device longer side, upside-down mounted to compensate for\n+    the lens optical inversion effect.\n+\n+    The images once captured to memory will be rotated and the value of the\n+    V4L2_CID_CAMERA_SENSOR_ROTATION will report a 90 degree rotation. ::\n+\n+\n+                 +-------------------------------------+\n+                 |                 _ _                 |\n+                 |                \\   /                |\n+                 |                 | |                 |\n+                 |                 | |                 |\n+                 |                 |  >                |\n+                 |                <  |                 |\n+                 |                 | |                 |\n+                 |                   .                 |\n+                 |                  V                  |\n+                 +-------------------------------------+\n+\n+    A correction of 90 degrees in counter-clockwise direction has to be\n+    applied to correctly display the image in portrait mode on the device\n+    screen. ::\n+\n+                          +--------------------+\n+                          |                    |\n+                          |                    |\n+                          |                    |\n+                          |                    |\n+                          |                    |\n+                          |                    |\n+                          |   |\\____)\\___      |\n+                          |   ) _____  __`<    |\n+                          |   |/     )/        |\n+                          |                    |\n+                          |                    |\n+                          |                    |\n+                          |                    |\n+                          |                    |\n+                          +--------------------+\n+\n+\n .. [#f1]\n    This control may be changed to a menu control in the future, if more\n    options are required.\n",
    "prefixes": [
        "libcamera-devel",
        "v10",
        "05/13"
    ]
}