{"id":9394,"url":"https://patchwork.libcamera.org/api/patches/9394/?format=json","web_url":"https://patchwork.libcamera.org/patch/9394/","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":"<20200826110926.67192-11-paul.elder@ideasonboard.com>","date":"2020-08-26T11:09:19","name":"[libcamera-devel,RFC,10/17] libcamera: IPAModule: Replace ipa_context with IPAInterface","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"0fc2d0815ecc3d075cf78505108fbd5c0cb4dc8d","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/9394/mbox/","series":[{"id":1243,"url":"https://patchwork.libcamera.org/api/series/1243/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1243","date":"2020-08-26T11:09:09","name":"[libcamera-devel,RFC,01/17] IPA: IPC: raspberrypi: Add data definition and generated header","version":1,"mbox":"https://patchwork.libcamera.org/series/1243/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/9394/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/9394/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 CA4E4BD87E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 Aug 2020 11:10:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 97F2162907;\n\tWed, 26 Aug 2020 13:10:13 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 032A1628F3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Aug 2020 13:10:13 +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 3BFAB53C;\n\tWed, 26 Aug 2020 13:10:10 +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=\"usvnx86F\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1598440212;\n\tbh=EwePtZp5fuiDyD3xiuPpKAkPxwi5TXYBBJzzBeP9v5E=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=usvnx86FRYnhOGlCi8h/Zy4rlmS7slW8XmiGBPnpxfNr/wvwQaprUDPFc7qJmpgBH\n\tUmhKsdXlsfLh1xpSA2i2a6H3oAvvCPTGudvYml4vFZwj+96WKn8gNWeuZkJC6Pbb5P\n\tfVuJhGThXn4H5oZ0rGwxbNKVVSKSwz89rKAHNW4Y=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 26 Aug 2020 20:09:19 +0900","Message-Id":"<20200826110926.67192-11-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.27.0","In-Reply-To":"<20200826110926.67192-1-paul.elder@ideasonboard.com>","References":"<20200826110926.67192-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [RFC PATCH 10/17] 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=\"us-ascii\"","Content-Transfer-Encoding":"7bit","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>\n---\n include/libcamera/internal/ipa_module.h |  4 ++--\n src/libcamera/ipa_module.cpp            | 16 +---------------\n 2 files changed, 3 insertions(+), 17 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..008325c4 100644\n--- a/src/libcamera/ipa_module.cpp\n+++ b/src/libcamera/ipa_module.cpp\n@@ -438,21 +438,7 @@ bool IPAModule::load()\n \treturn true;\n }\n \n-/**\n- * \\brief Instantiate an IPA context\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- *\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- */\n-struct ipa_context *IPAModule::createContext()\n+IPAInterface *IPAModule::createInterface()\n {\n \tif (!valid_ || !loaded_)\n \t\treturn nullptr;\n","prefixes":["libcamera-devel","RFC","10/17"]}