From c3648da6e9569ce43bd4bfdf4195681e47a7919c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Mon, 29 Jun 2020 17:14:13 +0200 Subject: libcamera: ipu3: Make it easier to read when a request may be completed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's confusing to read the code and understand that a request is only completed before being processed by the ImgU if it only contains a single RAW buffer. Add a boolean variable with a explanatory name to make this clearer, no functional change. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/ipu3/ipu3.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 1bdad209..958d8362 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -874,10 +874,12 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer) * If the request contains a buffer for the RAW stream only, complete it * now as there's no need for ImgU processing. */ - if (request->findBuffer(&rawStream_) && - pipe_->completeBuffer(camera_, request, buffer)) { - pipe_->completeRequest(camera_, request); - return; + if (request->findBuffer(&rawStream_)) { + bool isComplete = pipe_->completeBuffer(camera_, request, buffer); + if (isComplete) { + pipe_->completeRequest(camera_, request); + return; + } } imgu_->input_->queueBuffer(buffer); -- cgit v1.2.1