summaryrefslogtreecommitdiff
path: root/src/ipa/vimc/vimc.cpp
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2022-08-03 20:03:03 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2022-10-18 18:52:52 +0900
commit3b54b56a2d0228f879fb2502706a00dd67f84989 (patch)
treefd258191ef39cbfce17ed67f3de697146dba6547 /src/ipa/vimc/vimc.cpp
parent23fd404690d110ad2cffc33e8815dd9caa7dcc2f (diff)
ipa: vimc: Add Flags to parameters
For the purpose of testing serializing/deserializing Flags in function parameters, add an enum class TestFlags and Flags<TestFlags> to some function parameters, both for input and output and Signals. While at it, update the ipa_interface_test. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/vimc/vimc.cpp')
-rw-r--r--src/ipa/vimc/vimc.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp
index 5d494b63..9256bbba 100644
--- a/src/ipa/vimc/vimc.cpp
+++ b/src/ipa/vimc/vimc.cpp
@@ -31,7 +31,10 @@ public:
IPAVimc();
~IPAVimc();
- int init(const IPASettings &settings, const ipa::vimc::IPAOperationCode code) override;
+ int init(const IPASettings &settings,
+ const ipa::vimc::IPAOperationCode code,
+ const Flags<ipa::vimc::TestFlag> inFlags,
+ Flags<ipa::vimc::TestFlag> *outFlags) override;
int start() override;
void stop() override;
@@ -66,7 +69,10 @@ IPAVimc::~IPAVimc()
::close(fd_);
}
-int IPAVimc::init(const IPASettings &settings, const ipa::vimc::IPAOperationCode code)
+int IPAVimc::init(const IPASettings &settings,
+ const ipa::vimc::IPAOperationCode code,
+ const Flags<ipa::vimc::TestFlag> inFlags,
+ Flags<ipa::vimc::TestFlag> *outFlags)
{
trace(ipa::vimc::IPAOperationInit);
@@ -76,6 +82,13 @@ int IPAVimc::init(const IPASettings &settings, const ipa::vimc::IPAOperationCode
LOG(IPAVimc, Debug) << "Got opcode " << code;
+ LOG(IPAVimc, Debug)
+ << "Flag 2 was "
+ << (inFlags & ipa::vimc::TestFlag::Flag2 ? "" : "not ")
+ << "set";
+
+ *outFlags |= ipa::vimc::TestFlag::Flag1;
+
File conf(settings.configurationFile);
if (!conf.open(File::OpenModeFlag::ReadOnly)) {
LOG(IPAVimc, Error) << "Failed to open configuration file";
@@ -144,7 +157,8 @@ void IPAVimc::fillParamsBuffer([[maybe_unused]] uint32_t frame, uint32_t bufferI
return;
}
- paramsBufferReady.emit(bufferId);
+ Flags<ipa::vimc::TestFlag> flags;
+ paramsBufferReady.emit(bufferId, flags);
}
void IPAVimc::initTrace()