Show a patch.

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

{
    "id": 17890,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/17890/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17890/",
    "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": "<20221124121220.47000-5-jacopo@jmondi.org>",
    "date": "2022-11-24T12:12:15",
    "name": "[libcamera-devel,4/9] libcamera: camera_sensor: Verify flips support",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "e458e41eabc69cd00cb1e79c0e9bfc176745b2d7",
    "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/17890/mbox/",
    "series": [
        {
            "id": 3638,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3638/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3638",
            "date": "2022-11-24T12:12:11",
            "name": "libcamera: camera_sensor: Centralize flips handling",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3638/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17890/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17890/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 5FB2BBDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 24 Nov 2022 12:12:34 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0388463313;\n\tThu, 24 Nov 2022 13:12:34 +0100 (CET)",
            "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 BB58863319\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Nov 2022 13:12:30 +0100 (CET)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id C3C2940002;\n\tThu, 24 Nov 2022 12:12:29 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1669291954;\n\tbh=r+f33DwLy79JD2IOnj7rEgDwXTCozTBwrDQB5q1rtjU=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=iKOnmtrMTzz0CKb8dI8vm8NSYatWKA4frzPHsxqzhOu+CZ3gn3v7pM/fXEEnUd0TY\n\tsdYdK04FaW/Xx02aJApPrGgq+xGTRFFmGR2ci/Vhu0tASE4bJTj0PH4mVCE7pMUqw9\n\tBH/c+O+/fCTstRpEqcxgtX43IZqIB/HTb95b33BWELX6WPZkr3ZAbRrPdbehOMMOL+\n\tYUvBZuimJQvig7moo7oOMNAQKAargqo3vr3Olu2r/tWUcMz8jWW/s9d4go5pttJEq2\n\td4szTC18T9+a2m+W1qWCThh/t/FNqoQ19Kn9smZGa1mqOfBKptJ9iGKvOmHLriwDMk\n\tgUm20YVWEwWsQ==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 24 Nov 2022 13:12:15 +0100",
        "Message-Id": "<20221124121220.47000-5-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.38.1",
        "In-Reply-To": "<20221124121220.47000-1-jacopo@jmondi.org>",
        "References": "<20221124121220.47000-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 4/9] libcamera: camera_sensor: Verify\n\tflips support",
        "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>",
        "From": "Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Jacopo Mondi <jacopo@jmondi.org>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "During the camera sensor driver validation, verify if the sensor\nsupports horizontal and vertical flips and store a flag as\nCameraSensor::supportFlips_ class member.\n\nThe flag will be later inspected when applying flips.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/internal/camera_sensor.h |  1 +\n src/libcamera/camera_sensor.cpp            | 15 ++++++++++++++-\n 2 files changed, 15 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\nindex b9f4d7867854..878f3c28a3c9 100644\n--- a/include/libcamera/internal/camera_sensor.h\n+++ b/include/libcamera/internal/camera_sensor.h\n@@ -101,6 +101,7 @@ private:\n \tSize pixelArraySize_;\n \tRectangle activeArea_;\n \tconst BayerFormat *bayerFormat_;\n+\tbool supportFlips_;\n \n \tControlList properties_;\n \ndiff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex cbac9e7801ae..3afcbc482095 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -57,7 +57,8 @@ LOG_DEFINE_CATEGORY(CameraSensor)\n  */\n CameraSensor::CameraSensor(const MediaEntity *entity)\n \t: entity_(entity), pad_(UINT_MAX), staticProps_(nullptr),\n-\t  bayerFormat_(nullptr), properties_(properties::properties)\n+\t  bayerFormat_(nullptr), supportFlips_(false),\n+\t  properties_(properties::properties)\n {\n }\n \n@@ -271,6 +272,18 @@ int CameraSensor::validateSensorDriver()\n \t\t}\n \t}\n \n+\t/* Verify if sensor supports horizontal/vertical flips. */\n+\tconst struct v4l2_query_ext_ctrl *hflipInfo = subdev_->controlInfo(V4L2_CID_HFLIP);\n+\tconst struct v4l2_query_ext_ctrl *vflipInfo = subdev_->controlInfo(V4L2_CID_VFLIP);\n+\tif (hflipInfo && vflipInfo &&\n+\t    !(hflipInfo->flags & V4L2_CTRL_FLAG_READ_ONLY) &&\n+\t    !(vflipInfo->flags & V4L2_CTRL_FLAG_READ_ONLY))\n+\t\tsupportFlips_ = true;\n+\n+\tif (!supportFlips_)\n+\t\tLOG(CameraSensor, Warning)\n+\t\t\t<< \"Camera sensor does not support horizontal/vertical flip\";\n+\n \t/*\n \t * Make sure the required selection targets are supported.\n \t *\n",
    "prefixes": [
        "libcamera-devel",
        "4/9"
    ]
}