summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-11-03 22:43:07 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2021-02-05 01:20:32 +0100
commitc5fe5f572cae994cd39a32347ea273a22ddf8c89 (patch)
tree9817275d02c6c4e5fddb7f4421845e5a9828a631
parent758aa9ba6175309ab8c479e797ca65cb48e3aaeb (diff)
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>
-rw-r--r--src/libcamera/pipeline/ipu3/imgu.cpp7
-rw-r--r--src/libcamera/pipeline/ipu3/imgu.h7
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp11
3 files changed, 7 insertions, 18 deletions
diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp
index 5b1c0318..08f0fce9 100644
--- a/src/libcamera/pipeline/ipu3/imgu.cpp
+++ b/src/libcamera/pipeline/ipu3/imgu.cpp
@@ -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;
}
diff --git a/src/libcamera/pipeline/ipu3/imgu.h b/src/libcamera/pipeline/ipu3/imgu.h
index c73ac5a5..37f5ae77 100644
--- a/src/libcamera/pipeline/ipu3/imgu.h
+++ b/src/libcamera/pipeline/ipu3/imgu.h
@@ -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();
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index db0d6b91..23845ff3 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -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,