diff options
author | Nícolas F. R. A. Prado <nfraprado@collabora.com> | 2021-04-06 15:23:35 -0300 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2021-04-14 16:33:11 +0200 |
commit | e51926f07bfe26db6ae68b72bc64f1523968742d (patch) | |
tree | 9462996c22af2d0d065692659b99caf6c609c669 | |
parent | 63dd6a832722f801e93286f03428061dd0b16c00 (diff) |
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: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
-rw-r--r-- | src/libcamera/pipeline/rkisp1/rkisp1.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 3c8d9dfe..549f4a4e 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -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; |