{"id":9923,"url":"https://patchwork.libcamera.org/api/patches/9923/?format=json","web_url":"https://patchwork.libcamera.org/patch/9923/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20201002143154.468162-16-paul.elder@ideasonboard.com>","date":"2020-10-02T14:31:31","name":"[libcamera-devel,v3,15/38] libcamera: IPAModule: Replace ipa_context with IPAInterface","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"064a6e5efd72532ba33607707972ebee690d2b3f","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/9923/mbox/","series":[{"id":1348,"url":"https://patchwork.libcamera.org/api/series/1348/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1348","date":"2020-10-02T14:31:16","name":"IPA isolation implementation","version":3,"mbox":"https://patchwork.libcamera.org/series/1348/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/9923/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/9923/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 B1F03C3B5C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  2 Oct 2020 14:32:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7F9CC63BCA;\n\tFri,  2 Oct 2020 16:32:44 +0200 (CEST)","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 803DA63BA1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  2 Oct 2020 16:32:43 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6BDC21227;\n\tFri,  2 Oct 2020 16:32:41 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"FMr0Ec4h\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1601649163;\n\tbh=p0PQMXfmG5X0veOq8ApmjQ4021i0zabNkxPaWsShCMk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=FMr0Ec4hTFwl0unoedrkg0a10TNXOSh2WIQZYTU4qK5FWtZy7paSUQWzTrqvZAVOu\n\tcPDZYGvRoT1orKRBrMoDdll+yfQE2cl9oOmnzRdt8dBc+W65QkrWSZGWxm6utndbd9\n\tIeQOujB79wEdUYjl8uqUaO7SnHAzIPkr3aTeLi9g=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri,  2 Oct 2020 23:31:31 +0900","Message-Id":"<20201002143154.468162-16-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.27.0","In-Reply-To":"<20201002143154.468162-1-paul.elder@ideasonboard.com>","References":"<20201002143154.468162-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v3 15/38] libcamera: IPAModule: Replace\n\tipa_context with IPAInterface","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=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"With the new IPC infrastructure, we no longer need the C interface as\nprovided by struct ipa_context. Make ipaCreate_() and createInterface()\nreturn IPAInterface.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n---\nNo change in v3\n\nChanges in v2:\n- add documentation for IPAModule::createInterface()\n---\n include/libcamera/internal/ipa_module.h |  4 ++--\n src/libcamera/ipa_module.cpp            | 10 ++++------\n src/libcamera/meson.build               |  1 -\n 3 files changed, 6 insertions(+), 9 deletions(-)","diff":"diff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h\nindex c2df2476..19fc5827 100644\n--- a/include/libcamera/internal/ipa_module.h\n+++ b/include/libcamera/internal/ipa_module.h\n@@ -33,7 +33,7 @@ public:\n \n \tbool load();\n \n-\tstruct ipa_context *createContext();\n+\tIPAInterface *createInterface();\n \n \tbool match(PipelineHandler *pipe,\n \t\t   uint32_t minVersion, uint32_t maxVersion) const;\n@@ -52,7 +52,7 @@ private:\n \tbool loaded_;\n \n \tvoid *dlHandle_;\n-\ttypedef struct ipa_context *(*IPAIntfFactory)();\n+\ttypedef IPAInterface *(*IPAIntfFactory)(void);\n \tIPAIntfFactory ipaCreate_;\n };\n \ndiff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\nindex de512a7f..d5ac9820 100644\n--- a/src/libcamera/ipa_module.cpp\n+++ b/src/libcamera/ipa_module.cpp\n@@ -439,20 +439,18 @@ bool IPAModule::load()\n }\n \n /**\n- * \\brief Instantiate an IPA context\n+ * \\brief Instantiate an IPA interface\n  *\n  * After loading the IPA module with load(), this method creates an instance of\n- * the IPA module context. Ownership of the context is passed to the caller, and\n- * the context shall be destroyed by calling the \\ref ipa_context_ops::destroy\n- * \"ipa_context::ops::destroy()\" function.\n+ * the IPA module interface.\n  *\n  * Calling this function on a module that has not yet been loaded, or an\n  * invalid module (as returned by load() and isValid(), respectively) is\n  * an error.\n  *\n- * \\return The IPA context on success, or nullptr on error\n+ * \\return The IPA interface on success, or nullptr on error\n  */\n-struct ipa_context *IPAModule::createContext()\n+IPAInterface *IPAModule::createInterface()\n {\n \tif (!valid_ || !loaded_)\n \t\treturn nullptr;\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 796e381a..42340eae 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -22,7 +22,6 @@ libcamera_sources = files([\n     'formats.cpp',\n     'framebuffer_allocator.cpp',\n     'geometry.cpp',\n-    'ipa_context_wrapper.cpp',\n     'ipa_controls.cpp',\n     'ipa_data_serializer.cpp',\n     'ipa_ipc.cpp',\n","prefixes":["libcamera-devel","v3","15/38"]}