diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2021-02-05 16:27:06 +0100 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2021-02-08 20:13:57 +0100 |
commit | 03def6e9479b6a7385dfc68965a3e2782c319b18 (patch) | |
tree | 6b6db916162b3c03beb4e778b33fd1f66d15940d /src | |
parent | 4625132b902cf648e6b0f3dfbcfb5699bc21ece1 (diff) |
libcamera: ipu3: Get request from information structure instead of buffer
Buffers dequeued from the ImgU may not be associated with a Request as
they are internal (statistics, parameters and some RAW buffers). Fetch
the request they are used for from the frame information instead.
Fixes: 9708f49fecf2f9ee ("libcamera: ipu3: Share parameter and statistic buffers with IPA")
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/pipeline/ipu3/ipu3.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 9bc3df33..61f7bf43 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -1121,14 +1121,14 @@ void IPU3CameraData::queueFrameAction(unsigned int id, */ void IPU3CameraData::imguOutputBufferReady(FrameBuffer *buffer) { - Request *request = buffer->request(); - - pipe_->completeBuffer(request, buffer); - IPU3Frames::Info *info = frameInfos_.find(buffer); if (!info) return; + Request *request = info->request; + + pipe_->completeBuffer(request, buffer); + request->metadata().set(controls::draft::PipelineDepth, 3); /* \todo Move the ExposureTime control to the IPA. */ request->metadata().set(controls::ExposureTime, exposureTime_); @@ -1157,7 +1157,7 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer) if (!info) return; - Request *request = buffer->request(); + Request *request = info->request; /* If the buffer is cancelled force a complete of the whole request. */ if (buffer->metadata().status == FrameMetadata::FrameCancelled) { @@ -1186,7 +1186,7 @@ void IPU3CameraData::paramBufferReady(FrameBuffer *buffer) info->paramDequeued = true; if (frameInfos_.tryComplete(info)) - pipe_->completeRequest(buffer->request()); + pipe_->completeRequest(info->request); } void IPU3CameraData::statBufferReady(FrameBuffer *buffer) @@ -1198,7 +1198,7 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer) if (buffer->metadata().status == FrameMetadata::FrameCancelled) { info->metadataProcessed = true; if (frameInfos_.tryComplete(info)) - pipe_->completeRequest(buffer->request()); + pipe_->completeRequest(info->request); return; } |