Show a patch.

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

{
    "id": 11627,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/11627/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11627/",
    "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": "<20210319130120.141563-3-jacopo@jmondi.org>",
    "date": "2021-03-19T13:01:19",
    "name": "[libcamera-devel,v2,2/3] libcamera: camera_sensor: Do not register Location if not available",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0c1f9fbd30a0f93d6ece14bf8ced0d1c797c8928",
    "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/11627/mbox/",
    "series": [
        {
            "id": 1804,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1804/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1804",
            "date": "2021-03-19T13:01:17",
            "name": "libcamera: Do not default the location property",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/1804/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11627/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11627/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 13922C32E1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 19 Mar 2021 13:00:57 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 32FF968D6C;\n\tFri, 19 Mar 2021 14:00:56 +0100 (CET)",
            "from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8124168D61\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Mar 2021 14:00:54 +0100 (CET)",
            "from uno.homenet.telecomitalia.it\n\t(host-79-22-58-175.retail.telecomitalia.it [79.22.58.175])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay1-d.mail.gandi.net (Postfix) with ESMTPSA id ADC48240007;\n\tFri, 19 Mar 2021 13:00:53 +0000 (UTC)"
        ],
        "X-Originating-IP": "79.22.58.175",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 19 Mar 2021 14:01:19 +0100",
        "Message-Id": "<20210319130120.141563-3-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20210319130120.141563-1-jacopo@jmondi.org>",
        "References": "<20210319130120.141563-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v2 2/3] libcamera: camera_sensor: Do not\n\tregister Location if not available",
        "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": "Do not register the Location property if not available from the firmware\ninterface instead of defaulting it to External.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/camera_sensor.cpp | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 27f82071151e..f7ed91d990f7 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -468,12 +468,10 @@ int CameraSensor::initProperties()\n \t\t\tpropertyValue = properties::CameraLocationBack;\n \t\t\tbreak;\n \t\t}\n+\t\tproperties_.set(properties::Location, propertyValue);\n \t} else {\n-\t\tLOG(CameraSensor, Warning)\n-\t\t\t<< \"Failed to retrieve the camera location, setting to External\";\n-\t\tpropertyValue = properties::CameraLocationExternal;\n+\t\tLOG(CameraSensor, Warning) << \"Failed to retrieve the camera location\";\n \t}\n-\tproperties_.set(properties::Location, propertyValue);\n \n \tconst auto &rotationControl = controls.find(V4L2_CID_CAMERA_SENSOR_ROTATION);\n \tif (rotationControl != controls.end()) {\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "2/3"
    ]
}