[libcamera-devel,v6,08/12] libcamera: ipu3: Queue requests to ImgU

Message ID 20190402162134.3894-9-jacopo@jmondi.org
State Superseded
Headers show
Series
  • libcamera: ipu3: Add ImgU support
Related show

Commit Message

Jacopo Mondi April 2, 2019, 4:21 p.m. UTC
Implement queueRequest for the IPU3 pipeline manager. When a request is
queued, a new buffer is queued to the ImgU output for capture.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/libcamera/pipeline/ipu3/ipu3.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 7061f36b4495..9bceb8bfab35 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -398,9 +398,10 @@  void PipelineHandlerIPU3::stop(Camera *camera)
 int PipelineHandlerIPU3::queueRequest(Camera *camera, Request *request)
 {
 	IPU3CameraData *data = cameraData(camera);
-	V4L2Device *cio2 = data->cio2_.output_;
+	V4L2Device *output = data->imgu_->output_.dev;
 	Stream *stream = &data->stream_;
 
+	/* Queue a buffer to the ImgU output for capture. */
 	Buffer *buffer = request->findBuffer(stream);
 	if (!buffer) {
 		LOG(IPU3, Error)
@@ -408,7 +409,7 @@  int PipelineHandlerIPU3::queueRequest(Camera *camera, Request *request)
 		return -ENOENT;
 	}
 
-	int ret = cio2->queueBuffer(buffer);
+	int ret = output->queueBuffer(buffer);
 	if (ret < 0)
 		return ret;