summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2021-02-12 14:18:51 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-02-19 15:33:32 +0000
commitf73c505f7166c5287e34897a699445360ab7d99e (patch)
treee942136f3baa0841a64df42d5132f087ffe2e717
parenteacde8036e7dc26b41ac37b13ba38a4f9d7d9563 (diff)
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>
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp10
1 files changed, 8 insertions, 2 deletions
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<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";