[libcamera-devel,v3,6/7] libcamera: ipa: add dummy IPA that needs to be isolated

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

Commit Message

Paul Elder July 9, 2019, 6:44 p.m. UTC
Add a dummy IPA that needs to be isolated.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes in v3:
- fix header

Changes in v2:
- ipaModuleInfo contains license rather than "please isolate me"

 src/ipa/ipa_dummy_isolate.cpp | 46 +++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 src/ipa/ipa_dummy_isolate.cpp

Comments

Laurent Pinchart July 11, 2019, 6:23 a.m. UTC | #1
Hi Paul,

Thank you for the patch.

On Wed, Jul 10, 2019 at 03:44:49AM +0900, Paul Elder wrote:
> Add a dummy IPA that needs to be isolated.
> 
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> Changes in v3:
> - fix header
> 
> Changes in v2:
> - ipaModuleInfo contains license rather than "please isolate me"
> 
>  src/ipa/ipa_dummy_isolate.cpp | 46 +++++++++++++++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
>  create mode 100644 src/ipa/ipa_dummy_isolate.cpp
> 
> diff --git a/src/ipa/ipa_dummy_isolate.cpp b/src/ipa/ipa_dummy_isolate.cpp
> new file mode 100644
> index 0000000..8520546
> --- /dev/null
> +++ b/src/ipa/ipa_dummy_isolate.cpp
> @@ -0,0 +1,46 @@
> +/* SPDX-License-Identifier: LGPL-2.1-or-later */
> +/*
> + * Copyright (C) 2019, Google Inc.
> + *
> + * ipa_dummy_isolate.cpp - Dummy Image Processing Algorithm module that needs to be isolated

You can wrap the line and keep the Reviewed-by.

> + */
> +
> +#include <iostream>
> +
> +#include <libcamera/ipa/ipa_interface.h>
> +#include <libcamera/ipa/ipa_module_info.h>
> +
> +namespace libcamera {
> +
> +class IPADummyIsolate : public IPAInterface
> +{
> +public:
> +	int init();
> +};
> +
> +int IPADummyIsolate::init()
> +{
> +	std::cout << "initializing isolated dummy IPA!" << std::endl;
> +	return 0;
> +}
> +
> +/*
> + * External IPA module interface
> + */
> +
> +extern "C" {
> +const struct IPAModuleInfo ipaModuleInfo = {
> +	IPA_MODULE_API_VERSION,
> +	0,
> +	"PipelineHandlerVimc",
> +	"Dummy IPA for Vimc that needs to be isolated",
> +	"Proprietary",
> +};
> +
> +IPAInterface *ipaCreate()
> +{
> +	return new IPADummyIsolate();
> +}
> +};
> +
> +}; /* namespace libcamera */

Patch

diff --git a/src/ipa/ipa_dummy_isolate.cpp b/src/ipa/ipa_dummy_isolate.cpp
new file mode 100644
index 0000000..8520546
--- /dev/null
+++ b/src/ipa/ipa_dummy_isolate.cpp
@@ -0,0 +1,46 @@ 
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2019, Google Inc.
+ *
+ * ipa_dummy_isolate.cpp - Dummy Image Processing Algorithm module that needs to be isolated
+ */
+
+#include <iostream>
+
+#include <libcamera/ipa/ipa_interface.h>
+#include <libcamera/ipa/ipa_module_info.h>
+
+namespace libcamera {
+
+class IPADummyIsolate : public IPAInterface
+{
+public:
+	int init();
+};
+
+int IPADummyIsolate::init()
+{
+	std::cout << "initializing isolated dummy IPA!" << std::endl;
+	return 0;
+}
+
+/*
+ * External IPA module interface
+ */
+
+extern "C" {
+const struct IPAModuleInfo ipaModuleInfo = {
+	IPA_MODULE_API_VERSION,
+	0,
+	"PipelineHandlerVimc",
+	"Dummy IPA for Vimc that needs to be isolated",
+	"Proprietary",
+};
+
+IPAInterface *ipaCreate()
+{
+	return new IPADummyIsolate();
+}
+};
+
+}; /* namespace libcamera */