[libcamera-devel,RFC,04/10] libcamera: ipa_interface: add init for shims

Message ID 20190605221817.966-5-paul.elder@ideasonboard.com
State Superseded
Headers show
Series
  • Add IPA process isolation
Related show

Commit Message

Paul Elder June 5, 2019, 10:18 p.m. UTC
Add a function to IPAInterface for shims to use to initialize the IPA
module that it will wrap around.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
---
 include/libcamera/ipa/ipa_interface.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Laurent Pinchart June 6, 2019, 9:44 a.m. UTC | #1
Hi Paul,

Thank you for the patch.

On Wed, Jun 05, 2019 at 06:18:11PM -0400, Paul Elder wrote:
> Add a function to IPAInterface for shims to use to initialize the IPA
> module that it will wrap around.
> 
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> ---
>  include/libcamera/ipa/ipa_interface.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
> index 2c5eb1f..fd779d2 100644
> --- a/include/libcamera/ipa/ipa_interface.h
> +++ b/include/libcamera/ipa/ipa_interface.h
> @@ -15,6 +15,7 @@ public:
>  	virtual ~IPAInterface() {}
>  
>  	virtual int init() = 0;
> +	virtual int init(const char *path) { return 0; };

Could there be a way to have a single init function ? Thinking out loud,
how about passing the path to the factory function, so that the shim can
already load the module it wraps at create time ?

>  };
>  
>  } /* namespace libcamera */

Patch

diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
index 2c5eb1f..fd779d2 100644
--- a/include/libcamera/ipa/ipa_interface.h
+++ b/include/libcamera/ipa/ipa_interface.h
@@ -15,6 +15,7 @@  public:
 	virtual ~IPAInterface() {}
 
 	virtual int init() = 0;
+	virtual int init(const char *path) { return 0; };
 };
 
 } /* namespace libcamera */