From patchwork Fri Mar 12 06:11:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 11564 X-Patchwork-Delegate: kieran.bingham@ideasonboard.com 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 6C55BBD1F1 for ; Fri, 12 Mar 2021 06:11:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2D05F68C69; Fri, 12 Mar 2021 07:11:43 +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="MjuasMTL"; 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 65F2B68C71 for ; Fri, 12 Mar 2021 07:11:37 +0100 (CET) Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DF232ACB; Fri, 12 Mar 2021 07:11:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1615529497; bh=GN4ZSNV/Ucmhqppk28VewwPpJ1HdcIXmRI2HpNpYuWE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MjuasMTLU/JOaLXJeR8j9JdaSAouieH2HLLirkPRutqdnZ3hYrxjc0aQuh58gMBrd 7OhlXhDU1MvYGXiLbOIBhD5hObtMZoE6h8wcrAhJ/dGTbSR4FpClEpGOaWwvMFP3C3 T5hUb6ODr8J+z1w5S3kydoUodWou6jDG8X9VbQCk= From: Kieran Bingham To: libcamera devel Date: Fri, 12 Mar 2021 06:11:27 +0000 Message-Id: <20210312061131.854849-5-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210312061131.854849-1-kieran.bingham@ideasonboard.com> References: <20210312061131.854849-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 4/8] libcamera: pipeline: ipu3: frames: Use the request sequence 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" For all frame indexes, use the same sequence number as generated by the Request object. This allows clear matching of what operations occured to which request. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/ipu3/frames.cpp | 4 +--- src/libcamera/pipeline/ipu3/frames.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/frames.cpp b/src/libcamera/pipeline/ipu3/frames.cpp index 151ebfe7ca5f..4198e2019f3f 100644 --- a/src/libcamera/pipeline/ipu3/frames.cpp +++ b/src/libcamera/pipeline/ipu3/frames.cpp @@ -18,7 +18,6 @@ namespace libcamera { LOG_DECLARE_CATEGORY(IPU3) IPU3Frames::IPU3Frames() - : nextId_(0) { } @@ -31,7 +30,6 @@ void IPU3Frames::init(const std::vector> ¶mBuff for (const std::unique_ptr &buffer : statBuffers) availableStatBuffers_.push(buffer.get()); - nextId_ = 0; frameInfo_.clear(); } @@ -43,7 +41,7 @@ void IPU3Frames::clear() IPU3Frames::Info *IPU3Frames::create(Request *request) { - unsigned int id = nextId_++; + unsigned int id = request->sequence(); if (availableParamBuffers_.empty()) { LOG(IPU3, Error) << "Parameters buffer underrun"; diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h index 106e5c15cc7a..4acdf48eca9d 100644 --- a/src/libcamera/pipeline/ipu3/frames.h +++ b/src/libcamera/pipeline/ipu3/frames.h @@ -53,7 +53,6 @@ private: std::queue availableParamBuffers_; std::queue availableStatBuffers_; - unsigned int nextId_; std::map> frameInfo_; };