summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 73e06a91..2c292920 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -761,6 +761,8 @@ int PipelineHandlerIPU3::registerCameras()
&IPU3CameraData::imguInputBufferReady);
data->imgu_->output_.dev->bufferReady.connect(data.get(),
&IPU3CameraData::imguOutputBufferReady);
+ data->imgu_->viewfinder_.dev->bufferReady.connect(data.get(),
+ &IPU3CameraData::imguOutputBufferReady);
/* Create and register the Camera instance. */
std::string cameraName = cio2->sensor_->entity()->name() + " "
@@ -806,10 +808,20 @@ void PipelineHandlerIPU3::IPU3CameraData::imguInputBufferReady(Buffer *buffer)
*/
void PipelineHandlerIPU3::IPU3CameraData::imguOutputBufferReady(Buffer *buffer)
{
- Request *request = queuedRequests_.front();
+ Request *request = buffer->request();
+
+ if (!pipe_->completeBuffer(camera_, request, buffer))
+ /* Request not completed yet, return here. */
+ return;
- pipe_->completeBuffer(camera_, request, buffer);
- pipe_->completeRequest(camera_, request);
+ /* Complete the pending requests in queuing order. */
+ while (1) {
+ request = queuedRequests_.front();
+ if (request->hasPendingBuffers())
+ break;
+
+ pipe_->completeRequest(camera_, request);
+ }
}
/**