[{"id":12580,"web_url":"https://patchwork.libcamera.org/comment/12580/","msgid":"<20200919113853.GM1850958@oden.dyn.berto.se>","date":"2020-09-19T11:38:53","subject":"Re: [libcamera-devel] [PATCH 09/23] libcamera: IPAModule: Replace\n\tipa_context with IPAInterface","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Paul,\n\nThanks for your work.\n\nOn 2020-09-15 23:20:24 +0900, Paul Elder wrote:\n> With the new IPC infrastructure, we no longer need the C interface as\n> provided by struct ipa_context. Make ipaCreate_() and createInterface()\n> return IPAInterface.\n> \n> Signed-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>  src/libcamera/meson.build               |  1 -\n>  3 files changed, 3 insertions(+), 18 deletions(-)\n> \n> diff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h\n> index 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>  \n> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\n> index 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\nWith the documentation added this would get my R-b.\n\n> +IPAInterface *IPAModule::createInterface()\n>  {\n>  \tif (!valid_ || !loaded_)\n>  \t\treturn nullptr;\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 9d1abeb0..a2a6ed04 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> -- \n> 2.27.0\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 ED1A1C3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 19 Sep 2020 11:38:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 768FC62FAD;\n\tSat, 19 Sep 2020 13:38:57 +0200 (CEST)","from mail-lj1-x243.google.com (mail-lj1-x243.google.com\n\t[IPv6:2a00:1450:4864:20::243])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 37EE260367\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 19 Sep 2020 13:38:55 +0200 (CEST)","by mail-lj1-x243.google.com with SMTP id k25so7204180ljk.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 19 Sep 2020 04:38:55 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tj127sm1251044lfd.6.2020.09.19.04.38.53\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 19 Sep 2020 04:38:53 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"u5O4/oE/\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=7AKVdFYe8Tk9ZI5GKf1hmwSvkftHakSRHQxbETJ2ess=;\n\tb=u5O4/oE/5EIfoZMa7A67QSfSE5lFP9aOiGIHiFhsliDZTv4PhLZ3OFfFtUqYZyFy0z\n\tJI0Za4AYXsWGwI4bHOWjUYc9/OOGC1Cfa6rCTYg0V1e4kcgv1NjTDnpzJiEsL9lGEwOl\n\tPGBBAhfgZqAHi/KrqptnavIohYG6sYDaIsYT7+lexcGidrzGFbk+fT0J0dH2zX5nWYxE\n\tTCHn9jM1ZPvM6cuGqlZkyFNgSAEGBUZaopAldFWltgnPlXVMa/jldQxPouo9KST0PTiQ\n\tzNzvfah5n0mvOJJigGoyBeM/ttBbdIgztYiggCnTb3p1O8LY6aiYCij2O6yPnbjjC+V4\n\tnlWQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=7AKVdFYe8Tk9ZI5GKf1hmwSvkftHakSRHQxbETJ2ess=;\n\tb=kSHsUok46UYN4TQiGROVd1gLKWJPRiXtXWTOXPxe+K2jvNIolGnFX1B91jWGtzTV3Z\n\tU/kQSVnXRKyIjV56P1uBzFaSOy/u0COGvYLaAZ1P84yZykk3pbFw9dcpQZFhXNVH6GBc\n\t2WfnGapMQFUPwmNRg8crlqXP9pZZQytxSIzx7QLDNWyHJaqifmX8PyO5Zbv85z5DaX/B\n\t4WPh0Wg9Xp7YB3lQe0Y25vIcWsbO7rPhPDEW+yZQQ5c+hvAdSFZBR2BO6xGtghyury77\n\t+kgrQWnciVK4FsR3ZqG4RlABz7DOo1iPZf5mV5oaTWz1awSJaJn8+3M3yHg4DEVQ+oNi\n\tGhqQ==","X-Gm-Message-State":"AOAM532phv01NjG7kP2v54ZTM5OFUFMo94GhiQ5KDxoTk/hhWaNgDcqH\n\tPPMguSfYks1bKu4rjaU0ttkDHg==","X-Google-Smtp-Source":"ABdhPJyXvfMT9kCHr0F0aVYEuPGhFl7WkVwCO3UyR46auOqofKEmWKbSutFyPR6bNFYh5oa69wbctw==","X-Received":"by 2002:a2e:880d:: with SMTP id\n\tx13mr13807115ljh.20.1600515534282; \n\tSat, 19 Sep 2020 04:38:54 -0700 (PDT)","Date":"Sat, 19 Sep 2020 13:38:53 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<20200919113853.GM1850958@oden.dyn.berto.se>","References":"<20200915142038.28757-1-paul.elder@ideasonboard.com>\n\t<20200915142038.28757-10-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200915142038.28757-10-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 09/23] 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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]