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>
This commit is contained in:
Hirokazu Honda
2021-06-10 17:25:38 +09:00
committed by Jacopo Mondi
parent 5d0eb40249
commit bd63bb03c9

View File

@@ -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.