Show a patch.

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

{
    "id": 22941,
    "url": "https://patchwork.libcamera.org/api/patches/22941/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22941/",
    "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": "<20250310170246.185147-1-barnabas.pocze@ideasonboard.com>",
    "date": "2025-03-10T17:02:46",
    "name": "[v1] libcamera: camera: Ensure correct id maps are always set",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "f46b4d4ad51cf7f96fb9e62760b114d65a030d62",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22941/mbox/",
    "series": [
        {
            "id": 5049,
            "url": "https://patchwork.libcamera.org/api/series/5049/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5049",
            "date": "2025-03-10T17:02:46",
            "name": "[v1] libcamera: camera: Ensure correct id maps are always set",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5049/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22941/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22941/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 4054EC32F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 10 Mar 2025 17:02:54 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6F9FE687FA;\n\tMon, 10 Mar 2025 18:02:53 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BABB461802\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Mar 2025 18:02:51 +0100 (CET)",
            "from pb-laptop.local (185.221.143.221.nat.pool.zt.hu\n\t[185.221.143.221])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 917A2227\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Mar 2025 18:01:14 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"GYqzU1B5\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1741626075;\n\tbh=HQmFKMr6+1hQaARim4X82xuR+YHI6UwoE+VY4B43qik=;\n\th=From:To:Subject:Date:From;\n\tb=GYqzU1B5LIvhe+3iqKWwPPPtHJ8x+CR6DICfkIa/UJ9lJIfGSfwdhl5e32xKVtRSh\n\thiED625w5uDr3wMzQa+eZa19wKf+xk1xF2BjmemifIkjHuEuf+BCWFw8uIjy7QGuEy\n\tQAyjoyFA6F2hJ9JGbRd9HFLxED/r1g/+kvg5fOFA=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH v1] libcamera: camera: Ensure correct id maps are always set",
        "Date": "Mon, 10 Mar 2025 18:02:46 +0100",
        "Message-ID": "<20250310170246.185147-1-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.48.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "`Camera::Private::properties_` is a default constructed `ControlList`,\ntherefore it does not have an associated `ControlIdMap`. `controlInfo_`\nis in a similar situation.\n\nExtend the `Camera::Private` constructor to initialize the control id map\nof both properly.\n\nMultiple pipeline handlers copy the sensor's property list and\nset that as camera properties, and since the `CameraSensor{Legacy,Raw}`\nclasses set the proper id map, the camera properties will have it too.\n\nHowever, some pipelines, e.g. `uvcvideo` or `virtual`, do not do so,\nand thus there will be no id map set. To fix this, extend the\n`Camera::Private` constructor to set `properties::properties`.\n\nAs for `controlInfo_`, all pipeline handlers overwrite it during\ncamera initialization (and thus it will have the correct id map),\nbut still initialize the id map so that it is set at all times.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n src/libcamera/camera.cpp | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex 56c585199..c180a5fdd 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -21,6 +21,7 @@\n #include <libcamera/color_space.h>\n #include <libcamera/control_ids.h>\n #include <libcamera/framebuffer_allocator.h>\n+#include <libcamera/property_ids.h>\n #include <libcamera/request.h>\n #include <libcamera/stream.h>\n \n@@ -587,7 +588,8 @@ CameraConfiguration::Status CameraConfiguration::validateColorSpaces(ColorSpaceF\n  * \\param[in] pipe The pipeline handler responsible for the camera device\n  */\n Camera::Private::Private(PipelineHandler *pipe)\n-\t: requestSequence_(0), pipe_(pipe->shared_from_this()),\n+\t: controlInfo_({}, controls::controls), properties_(properties::properties),\n+\t  requestSequence_(0), pipe_(pipe->shared_from_this()),\n \t  disconnected_(false), state_(CameraAvailable)\n {\n }\n",
    "prefixes": [
        "v1"
    ]
}