Show a patch.

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

{
    "id": 10836,
    "url": "https://patchwork.libcamera.org/api/patches/10836/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10836/",
    "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-5-jacopo@jmondi.org>",
    "date": "2021-01-07T09:47:29",
    "name": "[libcamera-devel,v6,04/10] libcamera: camera_sensor: Default analogue crop rectangle",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "b6938aa3625a44f00b0e7c15f3dced7caf70036c",
    "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/10836/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/10836/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10836/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 52F1AC0F1A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  7 Jan 2021 09:47:31 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 27123635B0;\n\tThu,  7 Jan 2021 10:47:31 +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 5EBD663400\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  7 Jan 2021 10:47:29 +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 BBE35FF803;\n\tThu,  7 Jan 2021 09:47:28 +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:29 +0100",
        "Message-Id": "<20210107094735.11673-5-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 04/10] libcamera: camera_sensor:\n\tDefault analogue crop rectangle",
        "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": "As support for the V4L2_SEL_TGT_CROP selection target used to read the\nsensor analogue crop rectangle is schedule to become mandatory but is\nstill optional, use the sensor's active area size as fallback value to\nallow the creation of the CameraSensorInfo in the case the driver does\nnot support it.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/camera_sensor.cpp | 11 +++++++----\n 1 file changed, 7 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 0c9bd4f50cff..e8caa4467643 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -643,13 +643,16 @@ int CameraSensor::sensorInfo(CameraSensorInfo *info) const\n \t */\n \tinfo->activeAreaSize = { activeArea_.width, activeArea_.height };\n \n-\t/* It's mandatory for the subdevice to report its crop rectangle. */\n+\t/*\n+\t * \\todo Support for retreiving the crop rectangle is scheduled to\n+\t * become mandatory. For the time being use the default value if it has\n+\t * been initialized at sensor driver validation time.\n+\t */\n \tint ret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP, &info->analogCrop);\n \tif (ret) {\n+\t\tinfo->analogCrop = activeArea_;\n \t\tLOG(CameraSensor, Error)\n-\t\t\t<< \"Failed to construct camera sensor info: \"\n-\t\t\t<< \"the camera sensor does not report the crop rectangle\";\n-\t\treturn ret;\n+\t\t\t<< \"The analogue crop rectangle has been defaulted to the active area size\";\n \t}\n \n \t/*\n",
    "prefixes": [
        "libcamera-devel",
        "v6",
        "04/10"
    ]
}