From f73c505f7166c5287e34897a699445360ab7d99e Mon Sep 17 00:00:00 2001 From: Jean-Michel Hautbois Date: Fri, 12 Feb 2021 14:18:51 +0100 Subject: 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 Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart [Kieran: Updated message to match Laurent's suggestion] Signed-off-by: Kieran Bingham --- src/libcamera/pipeline/ipu3/ipu3.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/libcamera/pipeline/ipu3') diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index e2353e89..ff980b38 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -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(vfCfg ? IPU3PipeModeVideo : - IPU3PipeModeStillCapture)); + static_cast(IPU3PipeModeVideo)); ret = imgu->imgu_->setControls(&ctrls); if (ret) { LOG(IPU3, Error) << "Unable to set pipe_mode control"; -- cgit v1.2.1