diff options
author | Hirokazu Honda <hiroh@chromium.org> | 2021-06-10 17:25:38 +0900 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2021-06-14 14:11:03 +0200 |
commit | bd63bb03c9c56fa8477ba97b0203bfb6958b322b (patch) | |
tree | 1be5e242fa1b0fb5b83186399c309d9744a73f63 /src | |
parent | 5d0eb4024932cbf57bcc4d4fb0b37d98522cad7f (diff) |
libcamera: pipeline: ipu3: Report available sensor test pattern mode
PipelineHandlerIPU3 gets available test pattern modes of the
sensor device and reports them to a client.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/pipeline/ipu3/ipu3.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 87f6bac8..36256ea4 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -939,6 +939,16 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data) ControlInfoMap::Map controls = IPU3Controls; const ControlInfoMap &sensorControls = sensor->controls(); + const std::vector<int32_t> &testPatternModes = sensor->testPatternModes(); + if (!testPatternModes.empty()) { + std::vector<ControlValue> values; + values.reserve(testPatternModes.size()); + + for (int32_t pattern : testPatternModes) + values.emplace_back(pattern); + + controls[&controls::draft::TestPatternMode] = ControlInfo(values); + } /* * Compute exposure time limits. |