From patchwork Fri Nov 15 10:13:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 21908 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 CB0C9C32CE for ; Fri, 15 Nov 2024 10:14:01 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9B47E65886; Fri, 15 Nov 2024 11:13:59 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="PFQRkBPT"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DFF036586C for ; Fri, 15 Nov 2024 11:13:48 +0100 (CET) Received: from mail.ideasonboard.com (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 43EE21114; Fri, 15 Nov 2024 11:13:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1731665614; bh=hquK9PGF8VK4hnbDPiF0tdxZq2zhcxSdUi1q/tVBgd8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PFQRkBPTXVPjd4poh8nxpT2ji7Y0qitZGIt9Fsm3H9uZcvVA/Lwv3fqM+0RwV4zHN QX6dtX1A8JzxzO4ckq3qg3xVKiJuaJV9+TI9CHDMQisYB+y/Tfsq0wBKAEaQKDzVoz K7nSHbmRUQubf3AJ1yK7tqcyLJueUDfpt70kGcWs= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: Anthony.McGivern@arm.com, Daniel Scally , Jacopo Mondi , Kieran Bingham , Laurent Pinchart Subject: [PATCH v6 04/14] libcamera: mali-c55: Simplify bufferReady() Date: Fri, 15 Nov 2024 10:13:24 +0000 Message-Id: <20241115101334.453104-5-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241115101334.453104-1-dan.scally@ideasonboard.com> References: <20241115101334.453104-1-dan.scally@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" The PipelineHandler::completeBuffer() base class function returns a boolean to indicate if there still are pending buffers in the Request. Simplify the bufferReady() function in the Mali-C55 pipeline handler using the completeBuffer() return value. Signed-off-by: Daniel Scally Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- Changes in v6: - None Changes in v5: - None src/libcamera/pipeline/mali-c55/mali-c55.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp index 80cd98b3..7d0d0293 100644 --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp @@ -893,12 +893,8 @@ void PipelineHandlerMaliC55::imageBufferReady(FrameBuffer *buffer) { Request *request = buffer->request(); - completeBuffer(request, buffer); - - if (request->hasPendingBuffers()) - return; - - completeRequest(request); + if (completeBuffer(request, buffer)) + completeRequest(request); } void PipelineHandlerMaliC55::registerMaliCamera(std::unique_ptr data,