ipa: raspberrypi: Rationalise parameters to ipa::configure()

Rename ConfigInput to IPAConfig to be more consistent with the naming,
and remove ConfigInput::op, as it is never used.

Replace ConfigOutput with a ControlList type, as that is the only return
type from ipa::configure().

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Tested-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Naushir Patuck
2021-03-23 14:36:10 +00:00
committed by Laurent Pinchart
parent b876c64613
commit 787852a240
3 changed files with 16 additions and 23 deletions

View File

@@ -1236,7 +1236,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)
std::map<unsigned int, IPAStream> streamConfig;
std::map<unsigned int, ControlInfoMap> entityControls;
ipa::RPi::ConfigInput ipaConfig;
ipa::RPi::IPAConfig ipaConfig;
/* Get the device format to pass to the IPA. */
V4L2DeviceFormat sensorFormat;
@@ -1279,19 +1279,16 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)
}
/* Ready the IPA - it must know about the sensor resolution. */
ipa::RPi::ConfigOutput result;
ControlList controls;
ret = ipa_->configure(sensorInfo_, streamConfig, entityControls, ipaConfig,
&result);
&controls);
if (ret < 0) {
LOG(RPI, Error) << "IPA configuration failed!";
return -EPIPE;
}
if (!result.controls.empty()) {
ControlList &ctrls = result.controls;
unicam_[Unicam::Image].dev()->setControls(&ctrls);
}
if (!controls.empty())
unicam_[Unicam::Image].dev()->setControls(&controls);
/*
* Configure the H/V flip controls based on the combination of