Show a patch.

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

{
    "id": 13932,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/13932/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13932/",
    "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": "<20210924172525.160482-3-jacopo@jmondi.org>",
    "date": "2021-09-24T17:25:22",
    "name": "[libcamera-devel,v3,2/5] ipa: proxy_worker: Reset ControlSerializer on worker",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "02e6596cdf30a154dc5bf42151437201219e52c9",
    "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/13932/mbox/",
    "series": [
        {
            "id": 2567,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2567/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2567",
            "date": "2021-09-24T17:25:20",
            "name": "libcamera: control serializer fixes",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/2567/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13932/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13932/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 A4A0FBDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Sep 2021 17:24:47 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 925C569197;\n\tFri, 24 Sep 2021 19:24:46 +0200 (CEST)",
            "from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net\n\t[217.70.183.201])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A47C26918C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Sep 2021 19:24:43 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 8B2631BF203;\n\tFri, 24 Sep 2021 17:24:42 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 24 Sep 2021 19:25:22 +0200",
        "Message-Id": "<20210924172525.160482-3-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20210924172525.160482-1-jacopo@jmondi.org>",
        "References": "<20210924172525.160482-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 2/5] ipa: proxy_worker: Reset\n\tControlSerializer on worker",
        "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": "When running the IPA in isolated mode, each side of the IPC boundary\nhas an instance of the ControlSerializer class which is used to\nserializer/deserialize controls before transmitting them on the wire.\n\nThe IPAProxyWorker, which creates and manages the process the IPA runs in,\ndoes not reset its ControlSerializer upon an IPA::configure() call, while\nthe IPAProxy does, effectively creating a misalignment between the\ntwo sides of the fence.\n\nThis obviously creates issues as one side of the IPC runs with a\npopulated and possibly stale cache of ControlInfoMap references, while the\nother side gets reset every time a new configuration is applied to the\nCamera.\n\nFix that by resetting the IPAProxyWorker ControlSerializer on an\nIPA configure() call.\n\nThis change fixes an issue which is easily triggered by running two\nconsecutive capture sessions with the IPA running in isolated mode:\nERROR Serializer control_serializer.cpp:520 Can't deserialize ControlList: unknown ControlInfoMap\n\nFixes: 7832e19a599e (\"utils: ipc: add templates for code generation for IPC mechanism\")\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n .../libcamera_templates/module_ipa_proxy_worker.cpp.tmpl       | 3 +++\n 1 file changed, 3 insertions(+)",
    "diff": "diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\nindex c306d8dfcaf2..890246a8849b 100644\n--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\n+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\n@@ -79,6 +79,9 @@ public:\n \n {% for method in interface_main.methods %}\n \t\tcase {{cmd_enum_name}}::{{method.mojom_name|cap}}: {\n+{%- if method.mojom_name == \"configure\" %}\n+\t\t\tcontrolSerializer_.reset();\n+{%- endif %}\n \t\t{{proxy_funcs.deserialize_call(method|method_param_inputs, '_ipcMessage.data()', '_ipcMessage.fds()', false, true)|indent(16, true)}}\n {% for param in method|method_param_outputs %}\n \t\t\t{{param|name}} {{param.mojom_name}};\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "2/5"
    ]
}