From 677e8e1dfedbc363cfab0403fd69ce8ecf61841f Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Mon, 27 May 2019 17:50:19 -0400 Subject: libcamera: ipa_module_info: update struct to allow IPA matching We need a way to match pipelines with IPA modules, so add fields in IPAModuleInfo to hold the IPA module API version number, the pipeline name, and the pipeline version. The module API version is used to determine the layout of struct IPAModuleInfo. Also update IPA module tests and Doxygen accordingly. Doxygen needs to be updated to accomodate __attribute__((packed)). Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- src/libcamera/ipa_module.cpp | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'src/libcamera/ipa_module.cpp') diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp index 86cbe716..f79a44e7 100644 --- a/src/libcamera/ipa_module.cpp +++ b/src/libcamera/ipa_module.cpp @@ -169,6 +169,17 @@ int elfLoadSymbol(void *dst, size_t size, void *map, size_t soSize, } /* namespace */ +/** + * \def IPA_MODULE_API_VERSION + * \brief The IPA module API version + * + * This version number specifies the version for the layout of + * struct IPAModuleInfo. The IPA module shall use this macro to + * set its moduleAPIVersion field. + * + * \sa IPAModuleInfo::moduleAPIVersion + */ + /** * \struct IPAModuleInfo * \brief Information of an IPA module @@ -176,14 +187,23 @@ int elfLoadSymbol(void *dst, size_t size, void *map, size_t soSize, * This structure contains the information of an IPA module. It is loaded, * read, and validated before anything else is loaded from the shared object. * - * \var IPAModuleInfo::name - * \brief The name of the IPA module + * \var IPAModuleInfo::moduleAPIVersion + * \brief The IPA module API version that the IPA module implements + * + * This version number specifies the version for the layout of + * struct IPAModuleInfo. The IPA module shall report here the version that + * it was built for, using the macro IPA_MODULE_API_VERSION. + * + * \var IPAModuleInfo::pipelineVersion + * \brief The pipeline handler version that the IPA module is for * - * \var IPAModuleInfo::version - * \brief The version of the IPA module + * \var IPAModuleInfo::pipelineName + * \brief The name of the pipeline handler that the IPA module is for * - * \todo abi compatability version - * \todo pipeline compatability matcher + * This name is used to match a pipeline handler with the module. + * + * \var IPAModuleInfo::name + * \brief The name of the IPA module */ /** -- cgit v1.2.1