summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2022-08-02 16:39:12 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2022-10-18 18:52:51 +0900
commit23fd404690d110ad2cffc33e8815dd9caa7dcc2f (patch)
tree4344b9524a7d1e220dd6ed879fa5e4cd439f8a2d /src
parentdeaf13de9bd99457300d33d5c38aedd909fe8260 (diff)
ipa: vimc: Add IPAOperationCode to init() parameter list
For the purpose of testing serializing/deserializing enums in function parameters, add IPAOperationCode to the parameter list of init(). Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/ipa/vimc/vimc.cpp6
-rw-r--r--src/libcamera/pipeline/vimc/vimc.cpp2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp
index 85afb279..5d494b63 100644
--- a/src/ipa/vimc/vimc.cpp
+++ b/src/ipa/vimc/vimc.cpp
@@ -31,7 +31,7 @@ public:
IPAVimc();
~IPAVimc();
- int init(const IPASettings &settings) override;
+ int init(const IPASettings &settings, const ipa::vimc::IPAOperationCode code) override;
int start() override;
void stop() override;
@@ -66,7 +66,7 @@ IPAVimc::~IPAVimc()
::close(fd_);
}
-int IPAVimc::init(const IPASettings &settings)
+int IPAVimc::init(const IPASettings &settings, const ipa::vimc::IPAOperationCode code)
{
trace(ipa::vimc::IPAOperationInit);
@@ -74,6 +74,8 @@ int IPAVimc::init(const IPASettings &settings)
<< "initializing vimc IPA with configuration file "
<< settings.configurationFile;
+ LOG(IPAVimc, Debug) << "Got opcode " << code;
+
File conf(settings.configurationFile);
if (!conf.open(File::OpenModeFlag::ReadOnly)) {
LOG(IPAVimc, Error) << "Failed to open configuration file";
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index d2f2e460..df749bf7 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -471,7 +471,7 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
data->ipa_->paramsBufferReady.connect(data.get(), &VimcCameraData::paramsBufferReady);
std::string conf = data->ipa_->configurationFile("vimc.conf");
- data->ipa_->init(IPASettings{ conf, data->sensor_->model() });
+ data->ipa_->init(IPASettings{ conf, data->sensor_->model() }, ipa::vimc::IPAOperationInit);
/* Create and register the camera. */
std::set<Stream *> streams{ &data->stream_ };