ipa: rkisp1: Use IPAConfig in IPA::configure()
The RkISP1 implementation of IPA::configure() still uses the legacy interface where sensor controls (and eventually lens controls) are passed from the pipeline handler to the IPA in a map. Since the introduction of mojom-based IPA interface definition, it is possible to define custom data types and use them in the interface definition between the pipeline handler and the IPA. Align the RkISP1 IPA::configure() implementation with the one in the IPU3 IPA module by using a custom data type instead of relying on a map to pass controls to the IPA. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -715,18 +715,18 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
|
||||
return ret;
|
||||
|
||||
/* Inform IPA of stream configuration and sensor controls. */
|
||||
IPACameraSensorInfo sensorInfo = {};
|
||||
ret = data->sensor_->sensorInfo(&sensorInfo);
|
||||
ipa::rkisp1::IPAConfigInfo ipaConfig{};
|
||||
|
||||
ret = data->sensor_->sensorInfo(&ipaConfig.sensorInfo);
|
||||
if (ret) {
|
||||
/* \todo Turn this into a hard failure. */
|
||||
LOG(RkISP1, Warning) << "Camera sensor information not available";
|
||||
sensorInfo = {};
|
||||
ipaConfig.sensorInfo = {};
|
||||
}
|
||||
|
||||
std::map<uint32_t, ControlInfoMap> entityControls;
|
||||
entityControls.emplace(0, data->sensor_->controls());
|
||||
ipaConfig.sensorControls = data->sensor_->controls();
|
||||
|
||||
ret = data->ipa_->configure(sensorInfo, streamConfig, entityControls);
|
||||
ret = data->ipa_->configure(ipaConfig, streamConfig);
|
||||
if (ret) {
|
||||
LOG(RkISP1, Error) << "failed configuring IPA (" << ret << ")";
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user