From patchwork Thu Jun 18 12:38:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 26971 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 76B5FC3303 for ; Thu, 18 Jun 2026 12:39:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E0F8E62C7B; Thu, 18 Jun 2026 14:39:00 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Wn3ZkPsV"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D402F62B3F for ; Thu, 18 Jun 2026 14:38:49 +0200 (CEST) Received: from pb-laptop.local (185.182.214.63.nat.pool.zt.hu [185.182.214.63]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id ED0AA2F8 for ; Thu, 18 Jun 2026 14:38:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1781786295; bh=x8gcCAIS/4cUnDTG2+3N95O71DzE410X4cOw9WYp6SQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Wn3ZkPsVJWCxMD3uviXY5ugl7u7sBx4l6SD4v6ykFWvMz9jLLxZSdIYNxHUCoHi58 uSmMMvXgsyztjg1yvtv+W/4OQjnSt0aOd+/xE9p8w2yLW1I1IPmK96vFwMRZQ5CprT f/QN9Bmj/1VV5iIeuAwmPbGN7DExPrT88szIgnMI= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v1 07/27] libcamera: pipeline: imx8-isi: Use `completeBuffer()` return value Date: Thu, 18 Jun 2026 14:38:24 +0200 Message-ID: <20260618123844.656396-8-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260618123844.656396-1-barnabas.pocze@ideasonboard.com> References: <20260618123844.656396-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" There is no need to check `hasPendingBuffers()` since `completeBuffer()` return `true` if there are no buffers left to complete in the request. Signed-off-by: Barnabás Pőcze --- src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp index 706681fce5..c3d2695556 100644 --- a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp +++ b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp @@ -1131,11 +1131,8 @@ void PipelineHandlerISI::bufferReady(FrameBuffer *buffer) metadata.set(controls::SensorTimestamp, buffer->metadata().timestamp); - completeBuffer(request, buffer); - if (request->hasPendingBuffers()) - return; - - completeRequest(request); + if (completeBuffer(request, buffer)) + completeRequest(request); } /* Original function taken from simple.cpp */