libcamera: ipu3: Drop entityControls map

The IPA::configure() function has an IPAConfigInfo parameters which
contains a map of numerical indexes to ControlInfoMap instances.

This is a leftover of the old IPA protocol, where it was not possible to
specify a rich interface as it is possible today and each entity
ControlInfoMap was indexed by a numerical id and stored in a map.

Now that the IPA interface allows to specify parameters by name, drop the
map and send the sensor's control info map only.

If we'll need more ControlInfoMap to be shared with the IPA, a new parameter
can be added to IPAConfigInfo.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Jacopo Mondi 2021-08-31 17:14:23 +02:00
parent 72e8e03719
commit 4c1fc33d8a
3 changed files with 5 additions and 5 deletions

View file

@ -32,7 +32,7 @@ struct IPU3Action {
struct IPAConfigInfo {
libcamera.IPACameraSensorInfo sensorInfo;
map<uint32, libcamera.ControlInfoMap> entityControls;
libcamera.ControlInfoMap sensorControls;
libcamera.Size bdsOutputSize;
libcamera.Size iif;
};

View file

@ -337,14 +337,14 @@ void IPAIPU3::calculateBdsGrid(const Size &bdsOutputSize)
int IPAIPU3::configure(const IPAConfigInfo &configInfo)
{
if (configInfo.entityControls.empty()) {
LOG(IPAIPU3, Error) << "No controls provided";
if (configInfo.sensorControls.empty()) {
LOG(IPAIPU3, Error) << "No sensor controls provided";
return -ENODATA;
}
sensorInfo_ = configInfo.sensorInfo;
ctrls_ = configInfo.entityControls.at(0);
ctrls_ = configInfo.sensorControls;
const auto itExp = ctrls_.find(V4L2_CID_EXPOSURE);
if (itExp == ctrls_.end()) {

View file

@ -654,7 +654,7 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)
}
ipa::ipu3::IPAConfigInfo configInfo;
configInfo.entityControls.emplace(0, data->cio2_.sensor()->controls());
configInfo.sensorControls = data->cio2_.sensor()->controls();
configInfo.sensorInfo = sensorInfo;
configInfo.bdsOutputSize = config->imguConfig().bds;
configInfo.iif = config->imguConfig().iif;