Patch Detail
Show a patch.
GET /api/patches/1256/?format=api
{ "id": 1256, "url": "https://patchwork.libcamera.org/api/patches/1256/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1256/", "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": "<20190522210220.1631-2-paul.elder@ideasonboard.com>", "date": "2019-05-22T21:02:16", "name": "[libcamera-devel,RFC,1/5] libcamera: ipa_module_info: update struct to allow IPA matching", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "f023c572685fd04419b5ca1d87b4c1e2d34c9a38", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/1256/mbox/", "series": [ { "id": 317, "url": "https://patchwork.libcamera.org/api/series/317/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=317", "date": "2019-05-22T21:02:15", "name": "Add IPAManager", "version": 1, "mbox": "https://patchwork.libcamera.org/series/317/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1256/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1256/checks/", "tags": {}, "headers": { "Return-Path": "<paul.elder@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BD82860C02\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 22 May 2019 23:02:39 +0200 (CEST)", "from localhost.localdomain (unknown [96.44.9.117])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1647B52F;\n\tWed, 22 May 2019 23:02:38 +0200 (CEST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1558558959;\n\tbh=vN8KJVilLEyUj3gFJrwFW6Tl+JunqsuxEp/m5qYq8/Y=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=hZR3rSrx7ZVYJMxhxbs3COC/bNwjW0BjH19gitN0Zm5111/v3XrmOkqbIhr6b6rTm\n\tuEXzKioqXyw42fm8es/TgF8VFB3cVuPPctp0PBhbP2kRdB3HwDt1UHyXAs7A2sBy7n\n\tOpb7UURID4Oj3zGH9+VPQZRuxe8dyVDqiN6nSTsY=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 22 May 2019 17:02:16 -0400", "Message-Id": "<20190522210220.1631-2-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190522210220.1631-1-paul.elder@ideasonboard.com>", "References": "<20190522210220.1631-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC PATCH 1/5] libcamera: ipa_module_info:\n\tupdate struct to allow IPA matching", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "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>", "X-List-Received-Date": "Wed, 22 May 2019 21:02:40 -0000" }, "content": "We need a way to match pipelines with IPA modules, so add fields in\nIPAModuleInfo to hold the IPA API version number and the pipeline\nmatching string.\n\nAlso update IPA module tests accordingly.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n include/libcamera/ipa/ipa_module_info.h | 8 ++++--\n test/ipa/ipa_test.cpp | 37 +++++++++++++++++--------\n test/ipa/shared_test.c | 4 ++-\n test/ipa/shared_test.cpp | 6 ++--\n 4 files changed, 39 insertions(+), 16 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/ipa_module_info.h b/include/libcamera/ipa/ipa_module_info.h\nindex 4e0d668..f3ae97d 100644\n--- a/include/libcamera/ipa/ipa_module_info.h\n+++ b/include/libcamera/ipa/ipa_module_info.h\n@@ -7,14 +7,18 @@\n #ifndef __LIBCAMERA_IPA_MODULE_INFO_H__\n #define __LIBCAMERA_IPA_MODULE_INFO_H__\n \n+#include <stdint.h>\n+\n #ifdef __cplusplus\n namespace libcamera {\n #endif\n \n struct IPAModuleInfo {\n+\tuint32_t ipaAPIVersion;\n+\tuint32_t pipelineVersion;\n+\tchar pipelineName[256];\n \tchar name[256];\n-\tunsigned int version;\n-};\n+} __attribute__((packed));\n \n #ifdef __cplusplus\n extern \"C\" {\ndiff --git a/test/ipa/ipa_test.cpp b/test/ipa/ipa_test.cpp\nindex 9861ee2..ca15fbd 100644\n--- a/test/ipa/ipa_test.cpp\n+++ b/test/ipa/ipa_test.cpp\n@@ -33,6 +33,19 @@ protected:\n \n \t\tconst struct IPAModuleInfo &info = ll->info();\n \n+\t\tif (info.ipaAPIVersion != testInfo.ipaAPIVersion) {\n+\t\t\tcerr << \"test IPA module has incorrect ipaAPIVersion\" << endl;\n+\t\t\tcerr << \"expected \\\"\" << testInfo.ipaAPIVersion << \"\\\", got \\\"\"\n+\t\t\t << info.ipaAPIVersion << \"\\\"\" << endl;\n+\t\t\tret = -1;\n+\t\t}\n+\t\tif (info.pipelineVersion != testInfo.pipelineVersion) {\n+\t\t\tcerr << \"test IPA module has incorrect pipelineVersion\" << endl;\n+\t\t\tcerr << \"expected \\\"\" << testInfo.pipelineVersion << \"\\\", got \\\"\"\n+\t\t\t << info.pipelineVersion << \"\\\"\" << endl;\n+\t\t\tret = -1;\n+\t\t}\n+\n \t\tif (strcmp(info.name, testInfo.name)) {\n \t\t\tcerr << \"test IPA module has incorrect name\" << endl;\n \t\t\tcerr << \"expected \\\"\" << testInfo.name << \"\\\", got \\\"\"\n@@ -40,13 +53,6 @@ protected:\n \t\t\tret = -1;\n \t\t}\n \n-\t\tif (info.version != testInfo.version) {\n-\t\t\tcerr << \"test IPA module has incorrect version\" << endl;\n-\t\t\tcerr << \"expected \\\"\" << testInfo.version << \"\\\", got \\\"\"\n-\t\t\t << info.version << \"\\\"\" << endl;\n-\t\t\tret = -1;\n-\t\t}\n-\n \t\tdelete ll;\n \t\treturn ret;\n \t}\n@@ -55,14 +61,23 @@ protected:\n \t{\n \t\tint count = 0;\n \n-\t\tconst struct IPAModuleInfo testInfo = {\n-\t\t\t\"It's over nine thousand!\",\n+\t\tconst struct IPAModuleInfo testInfo1 = {\n+\t\t\t1,\n \t\t\t9001,\n+\t\t\t\"bloop\",\n+\t\t\t\"It's over nine thousand!\",\n+\t\t};\n+\n+\t\tconst struct IPAModuleInfo testInfo2 = {\n+\t\t\t1,\n+\t\t\t8999,\n+\t\t\t\"bleep\",\n+\t\t\t\"It's under nine thousand!\",\n \t\t};\n \n-\t\tcount += runTest(\"test/ipa/ipa-dummy-c.so\", testInfo);\n+\t\tcount += runTest(\"test/ipa/ipa-dummy-c.so\", testInfo1);\n \n-\t\tcount += runTest(\"test/ipa/ipa-dummy-cpp.so\", testInfo);\n+\t\tcount += runTest(\"test/ipa/ipa-dummy-cpp.so\", testInfo2);\n \n \t\tif (count < 0)\n \t\t\treturn TestFail;\ndiff --git a/test/ipa/shared_test.c b/test/ipa/shared_test.c\nindex 87d182b..0046ace 100644\n--- a/test/ipa/shared_test.c\n+++ b/test/ipa/shared_test.c\n@@ -1,6 +1,8 @@\n #include <libcamera/ipa/ipa_module_info.h>\n \n const struct IPAModuleInfo ipaModuleInfo = {\n+\t.ipaAPIVersion = 1,\n+\t.pipelineVersion = 9001,\n+\t.pipelineName = \"bloop\",\n \t.name = \"It's over nine thousand!\",\n-\t.version = 9001,\n };\ndiff --git a/test/ipa/shared_test.cpp b/test/ipa/shared_test.cpp\nindex 4e5c976..78405b1 100644\n--- a/test/ipa/shared_test.cpp\n+++ b/test/ipa/shared_test.cpp\n@@ -4,8 +4,10 @@ namespace libcamera {\n \n extern \"C\" {\n const struct libcamera::IPAModuleInfo ipaModuleInfo = {\n-\t\"It's over nine thousand!\",\n-\t9001,\n+\t1,\n+\t8999,\n+\t\"bleep\",\n+\t\"It's under nine thousand!\",\n };\n };\n \n", "prefixes": [ "libcamera-devel", "RFC", "1/5" ] }