Patch Detail
Show a patch.
GET /api/patches/21652/?format=api
{ "id": 21652, "url": "https://patchwork.libcamera.org/api/patches/21652/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21652/", "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": "<20241017124613.3853273-3-mike.rudenko@gmail.com>", "date": "2024-10-17T12:46:12", "name": "[2/3] utils: ipc: Allow start method with output parameters in IPA proxies", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "e2ada1322d509fc0288c1bf1883a7fd0aaa37f25", "submitter": { "id": 146, "url": "https://patchwork.libcamera.org/api/people/146/?format=api", "name": "Mikhail Rudenko", "email": "mike.rudenko@gmail.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/21652/mbox/", "series": [ { "id": 4710, "url": "https://patchwork.libcamera.org/api/series/4710/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4710", "date": "2024-10-17T12:46:10", "name": "Reduce rkisp1 flicker on first start", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4710/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21652/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21652/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 08B74C32FD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 17 Oct 2024 12:46:34 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4ADD66538B;\n\tThu, 17 Oct 2024 14:46:34 +0200 (CEST)", "from mail-lj1-x236.google.com (mail-lj1-x236.google.com\n\t[IPv6:2a00:1450:4864:20::236])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1FC8E6353B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 17 Oct 2024 14:46:24 +0200 (CEST)", "by mail-lj1-x236.google.com with SMTP id\n\t38308e7fff4ca-2fb587d0436so10037341fa.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 17 Oct 2024 05:46:24 -0700 (PDT)", "from localhost ([83.149.246.185]) by smtp.gmail.com with ESMTPSA id\n\t38308e7fff4ca-2fb5d0fdd34sm7173311fa.12.2024.10.17.05.46.21\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 17 Oct 2024 05:46:22 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"JrgaYjmA\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20230601; t=1729169183; x=1729773983;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=mBo7mhFEAoREmEgOkqNk+zC0d3g9ZeqMWWN8cDklThM=;\n\tb=JrgaYjmAOMyONe78+DMrcnXnagstuvsCxB+CV0H4LoWQulZMJ+Ple4Ly4znPgaB2l3\n\tu3oOmdrOCgB5MWP2tQh5AGv1GSaf6ePxOXL+aORgQH+yeRmt8X9yau/+svirr4/DBqHJ\n\tzkEbQvsK+AjrVU1DXHLkfGakLi17JJAwDBSLldQZAl7mZCC7iJahZ1Qd3jt+Cp90UNF6\n\t+Q3ZO4dTahhAPT6WHcgTNlqnKOELBJjp5HT5c8k34l4XdBnzshUCM/fJZBqRDPO3poCq\n\tKNvx6nMnegIyeeEMZ/M5DfbbNujRRa0viqq5V6al8aP1la31FP4qx3rNdzbAAj0/hp8X\n\tEm4A==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1729169183; x=1729773983;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=mBo7mhFEAoREmEgOkqNk+zC0d3g9ZeqMWWN8cDklThM=;\n\tb=UwXPl/QcEiqphqVJ1PhimOE4wXwYLh7eMNCpdl6N0zOJjZdALoJPGgxAfNMDCHTV4b\n\tU6GnWox3hLchD0KvsA3WxSWCCUOhUgQNyUdFvYz1NP+fh+6qwXmoS1sN5qnbz+mm613h\n\t5E406jaNrtz+/3EfZeOT/iIi/clpFhV/rBq7D35+FuyQC9n0QciOeYpMzlg3Eim2k8JF\n\t5hJzwlwxFva1W/9owH7XN3X8WF2be/9kR7wofSLIhyHNOZf8q+Ug796AfCx+7pKHcu1P\n\tzUtUTFxCXOZj7k7aNHYHyWpn0YJ98lWAxoPbu0UCSY1XB2NVQIN4uvGDhqL98NmfFcOY\n\taJ/A==", "X-Gm-Message-State": "AOJu0YwYHzSH73BVOxv5C1+iJvI6jybAjlf8ehPPiWPrc+08uKIZMUhh\n\tiusnrq+2nD4VIrT9mFY9/fd02ccxKnCwXWwWAgTrSAs9UpYZC9k/nRrGRw==", "X-Google-Smtp-Source": "AGHT+IGj8zzuNnD7lSLbU0PSJcez3rYW1i7t26X2GliS7RBmiAEPWwUxW5oraYqJxeG/+ReLGduKLA==", "X-Received": "by 2002:a2e:719:0:b0:2fb:3d1d:dd96 with SMTP id\n\t38308e7fff4ca-2fb3f1b477dmr80151941fa.20.1729169182589; \n\tThu, 17 Oct 2024 05:46:22 -0700 (PDT)", "From": "Mikhail Rudenko <mike.rudenko@gmail.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Mikhail Rudenko <mike.rudenko@gmail.com>", "Subject": "[PATCH 2/3] utils: ipc: Allow start method with output parameters in\n\tIPA proxies", "Date": "Thu, 17 Oct 2024 15:46:12 +0300", "Message-ID": "<20241017124613.3853273-3-mike.rudenko@gmail.com>", "X-Mailer": "git-send-email 2.46.0", "In-Reply-To": "<20241017124613.3853273-1-mike.rudenko@gmail.com>", "References": "<20241017124613.3853273-1-mike.rudenko@gmail.com>", "MIME-Version": "1.0", "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": "At present IPA proxy and IPA proxy worker templates generate incorrect\ncode when IPA start method has multiple output parameters and no input\nparameters. Fix that. Also merge repetitive cases of start function\nreturning void/non-void in IPA proxy template.\n\nSigned-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>\n---\n .../libcamera_templates/module_ipa_proxy.h.tmpl | 11 ++++-------\n .../module_ipa_proxy_worker.cpp.tmpl | 2 +-\n 2 files changed, 5 insertions(+), 8 deletions(-)", "diff": "diff --git a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\nindex e213b18a..138832b5 100644\n--- a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\n+++ b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\n@@ -95,13 +95,10 @@ private:\n {%- elif method.mojom_name == \"start\" %}\n \t\t{{proxy_funcs.func_sig(proxy_name, method, \"\", false)|indent(16)}}\n \t\t{\n-{%- if method|method_return_value != \"void\" %}\n-\t\t\treturn ipa_->{{method.mojom_name}}({{method.parameters|params_comma_sep}});\n-{%- else %}\n-\t\t\tipa_->{{method.mojom_name}}({{method.parameters|params_comma_sep}}\n-\t{{- \", \" if method|method_param_outputs|params_comma_sep -}}\n-\t{{- method|method_param_outputs|params_comma_sep}});\n-{%- endif %}\n+\t\t\t{{ \"return\" if method|method_return_value != \"void\" }} ipa_->\n+\t\t\t{{- method.mojom_name}}({{method.parameters|params_comma_sep}}\n+\t\t\t\t{{- \", \" if method|method_param_outputs|params_comma_sep and method.parameters|params_comma_sep -}}\n+\t\t\t\t{{- method|method_param_outputs|params_comma_sep}});\n \t\t}\n {%- endif %}\n {%- endfor %}\ndiff --git a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\nindex 1f990d3f..6bc11a09 100644\n--- a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\n+++ b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\n@@ -93,7 +93,7 @@ public:\n \t\t\t{{method|method_return_value}} _callRet =\n {%- endif -%}\n \t\t\tipa_->{{method.mojom_name}}({{method.parameters|params_comma_sep}}\n-{{- \", \" if method|method_param_outputs|params_comma_sep -}}\n+{{- \", \" if method|method_param_outputs|params_comma_sep and method.parameters|params_comma_sep -}}\n {%- for param in method|method_param_outputs -%}\n &{{param.mojom_name}}{{\", \" if not loop.last}}\n {%- endfor -%}\n", "prefixes": [ "2/3" ] }