From patchwork Mon Feb 12 15:35:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 19478 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 B38A5C3257 for ; Mon, 12 Feb 2024 15:35:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B24E562808; Mon, 12 Feb 2024 16:35:45 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="sSBdrBfQ"; 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 B31A1627FE for ; Mon, 12 Feb 2024 16:35:43 +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 ED648B53; Mon, 12 Feb 2024 16:35:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1707752142; bh=DxJqQex+DsTsuM3bNz0S4N1NOuMFev5rQoljL/VGl8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sSBdrBfQOfZh62TGh6e2BOok2XFKTvG84S0tnctUTA8J3+7mYh41JhEogYFS1ayzM QLJtMCybi4g0qQsob/3paXMKVNRaO76pzaeuK77v44ZDf6xoTVD0tbEEVvdQh/Wyuh e8JGTCXxVJnUkVAsDMcbltpyZpp1ve2vbgvQUnJ4= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Subject: [PATCH 1/5] libcamera: rkisp1: Make tryCompleteRequest() params agnostic Date: Mon, 12 Feb 2024 15:35:28 +0000 Message-Id: <20240212153532.179283-2-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240212153532.179283-1-dan.scally@ideasonboard.com> References: <20240212153532.179283-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" tryCompleteRequest() doesn't actually need to know the status of the parameters buffer to decide whether it's ok to complete the Request or not - remove the check. Since setting the paramsDequeued flag is all that the paramsReady slot actually does, that can be removed too. Signed-off-by: Daniel Scally --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 586b46d6..5460dc11 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -60,7 +60,6 @@ struct RkISP1FrameInfo { FrameBuffer *mainPathBuffer; FrameBuffer *selfPathBuffer; - bool paramDequeued; bool metadataProcessed; }; @@ -177,7 +176,6 @@ private: int createCamera(MediaEntity *sensor); void tryCompleteRequest(RkISP1FrameInfo *info); void bufferReady(FrameBuffer *buffer); - void paramReady(FrameBuffer *buffer); void statReady(FrameBuffer *buffer); void frameStart(uint32_t sequence); @@ -248,7 +246,6 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req info->mainPathBuffer = mainPathBuffer; info->selfPathBuffer = selfPathBuffer; info->statBuffer = statBuffer; - info->paramDequeued = false; info->metadataProcessed = false; frameInfo_[frame] = info; @@ -1213,7 +1210,6 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator) if (hasSelfPath_) selfPath_.bufferReady().connect(this, &PipelineHandlerRkISP1::bufferReady); stat_->bufferReady.connect(this, &PipelineHandlerRkISP1::statReady); - param_->bufferReady.connect(this, &PipelineHandlerRkISP1::paramReady); /* * Enumerate all sensors connected to the ISP and create one @@ -1243,9 +1239,6 @@ void PipelineHandlerRkISP1::tryCompleteRequest(RkISP1FrameInfo *info) if (!info->metadataProcessed) return; - if (!isRaw_ && !info->paramDequeued) - return; - data->frameInfo_.destroy(info->frame); completeRequest(request); @@ -1287,19 +1280,6 @@ void PipelineHandlerRkISP1::bufferReady(FrameBuffer *buffer) tryCompleteRequest(info); } -void PipelineHandlerRkISP1::paramReady(FrameBuffer *buffer) -{ - ASSERT(activeCamera_); - RkISP1CameraData *data = cameraData(activeCamera_); - - RkISP1FrameInfo *info = data->frameInfo_.find(buffer); - if (!info) - return; - - info->paramDequeued = true; - tryCompleteRequest(info); -} - void PipelineHandlerRkISP1::statReady(FrameBuffer *buffer) { ASSERT(activeCamera_);