libcamera: ipu3: imgu: Configure the stat video device as part of configure()

There is no reason to expose and call a separate configureStat() when
the statistics video device can be configured with the exact same
parameters as part of configure(). Move the configuration internally to
the ImgUDevice simplifying the interface, there is no functional change.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Niklas Söderlund
2020-11-03 22:43:07 +01:00
parent 758aa9ba61
commit c5fe5f572c
3 changed files with 7 additions and 18 deletions
+7
View File
@@ -475,6 +475,13 @@ int ImgUDevice::configure(const PipeConfig &pipeConfig, V4L2DeviceFormat *inputF
LOG(IPU3, Debug) << "ImgU GDC format = " << gdcFormat.toString();
StreamConfiguration statCfg = {};
statCfg.size = inputFormat->size;
V4L2DeviceFormat statFormat;
ret = configureVideoDevice(stat_.get(), PAD_STAT, statCfg, &statFormat);
if (ret)
return ret;
return 0;
}
-7
View File
@@ -61,13 +61,6 @@ public:
outputFormat);
}
int configureStat(const StreamConfiguration &cfg,
V4L2DeviceFormat *outputFormat)
{
return configureVideoDevice(stat_.get(), PAD_STAT, cfg,
outputFormat);
}
int allocateBuffers(unsigned int bufferCount);
void freeBuffers();
-11
View File
@@ -522,17 +522,6 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)
return ret;
}
/*
* Apply the largest available format to the stat node.
* \todo Revise this when we'll actually use the stat node.
*/
StreamConfiguration statCfg = {};
statCfg.size = cio2Format.size;
ret = imgu->configureStat(statCfg, &outputFormat);
if (ret)
return ret;
/* Apply the "pipe_mode" control to the ImgU subdevice. */
ControlList ctrls(imgu->imgu_->controls());
ctrls.set(V4L2_CID_IPU3_PIPE_MODE,