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: 9708f49fec ("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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user