{"id":9720,"url":"https://patchwork.libcamera.org/api/1.1/patches/9720/?format=json","web_url":"https://patchwork.libcamera.org/patch/9720/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20200922133537.258098-17-paul.elder@ideasonboard.com>","date":"2020-09-22T13:35:15","name":"[libcamera-devel,16/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/1.1/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/9720/mbox/","series":[{"id":1309,"url":"https://patchwork.libcamera.org/api/1.1/series/1309/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1309","date":"2020-09-22T13:34:59","name":"IPA isolation implementation","version":1,"mbox":"https://patchwork.libcamera.org/series/1309/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/9720/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/9720/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 BC61DBF01C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Sep 2020 13:37:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 898B762FDA;\n\tTue, 22 Sep 2020 15:37:48 +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 E444260576\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Sep 2020 15:37:46 +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 59D20555;\n\tTue, 22 Sep 2020 15:37:40 +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=\"touyQLrT\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1600781862;\n\tbh=xYwKaZZqBzRX5jVC6fsX0W3YdsWGw80vyigTmQbm724=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=touyQLrTznqPfUVjNHYeB4IGWyxtrM+QqnTQwHBSl9s9ehvh7mDsrvh/PrANKuH5N\n\tMOhDzrEVSTr9CRgU3kVKeuKHs018I2wkIHO1k3q2dZ0qxt4qQfZny50/ekQxWF5NoG\n\tuevEiAdnr2exntp0F+YpbyTsl4+I/z/xxILrPHCk=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 22 Sep 2020 22:35:15 +0900","Message-Id":"<20200922133537.258098-17-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.27.0","In-Reply-To":"<20200922133537.258098-1-paul.elder@ideasonboard.com>","References":"<20200922133537.258098-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH 16/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---\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 24f32815..4b7a9ba8 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -21,7 +21,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","16/38"]}