Commit f40e942c authored by Nícolas F. R. A. Prado's avatar Nícolas F. R. A. Prado
Browse files

libcamera: pipeline: rkisp1: Allow requests to be cancelled



Previously when a frame got cancelled, the frameInfo flags
metadataProcessed and paramDequeued wouldn't get set, meaning that the
request wasn't able to be completed and cancelled.

Make sure that these flags are set when the frame gets cancelled so that
the request can be cancelled.

This issue happened while running lc-compliance.
Suggested-by: default avatarKieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Nícolas F. R. A. Prado's avatarNícolas F. R. A. Prado <nfraprado@collabora.com>
parent 8e960260
......@@ -1073,9 +1073,6 @@ void PipelineHandlerRkISP1::bufferReady(FrameBuffer *buffer)
void PipelineHandlerRkISP1::paramReady(FrameBuffer *buffer)
{
if (buffer->metadata().status == FrameMetadata::FrameCancelled)
return;
ASSERT(activeCamera_);
RkISP1CameraData *data = cameraData(activeCamera_);
......@@ -1087,9 +1084,6 @@ void PipelineHandlerRkISP1::paramReady(FrameBuffer *buffer)
void PipelineHandlerRkISP1::statReady(FrameBuffer *buffer)
{
if (buffer->metadata().status == FrameMetadata::FrameCancelled)
return;
ASSERT(activeCamera_);
RkISP1CameraData *data = cameraData(activeCamera_);
......@@ -1097,6 +1091,12 @@ void PipelineHandlerRkISP1::statReady(FrameBuffer *buffer)
if (!info)
return;
if (buffer->metadata().status == FrameMetadata::FrameCancelled) {
info->metadataProcessed = true;
tryCompleteRequest(info->request);
return;
}
if (data->frame_ <= buffer->metadata().sequence)
data->frame_ = buffer->metadata().sequence + 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment