libcamera: ipu3: set V4L2_CID_INTEL_IPU3_MODE

In order to get the stats back, the imgu subdev needs to have the
V4L2_CID_INTEL_IPU3_MODE control set.

Set it to video mode by default to get the stats at each frame.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[Kieran: Updated message to match Laurent's suggestion]
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Jean-Michel Hautbois
2021-02-19 15:33:32 +00:00
committed by Kieran Bingham
parent eacde8036e
commit f73c505f71
+8 -2
View File
@@ -555,9 +555,15 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)
/* Apply the "pipe_mode" control to the ImgU subdevice. */
ControlList ctrls(imgu->imgu_->controls());
/*
* Set the ImgU pipe mode to 'Video' unconditionally to have statistics
* generated.
*
* \todo Figure out what the 'Still Capture' mode is meant for, and use
* it accordingly.
*/
ctrls.set(V4L2_CID_IPU3_PIPE_MODE,
static_cast<int32_t>(vfCfg ? IPU3PipeModeVideo :
IPU3PipeModeStillCapture));
static_cast<int32_t>(IPU3PipeModeVideo));
ret = imgu->imgu_->setControls(&ctrls);
if (ret) {
LOG(IPU3, Error) << "Unable to set pipe_mode control";