From patchwork Thu Mar 25 13:42:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 11709 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 5939BC32E9 for ; Thu, 25 Mar 2021 13:42:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 320F768D7A; Thu, 25 Mar 2021 14:42:39 +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="durc1w8A"; 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 9AE7D602D9 for ; Thu, 25 Mar 2021 14:42:36 +0100 (CET) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7AA3A8C9; Thu, 25 Mar 2021 14:42:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1616679755; bh=+eJVhfP/EG7xCEzMb3zus1otZQVQ8RQJ4sSGGnO+zY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=durc1w8ASfSF9zCd9jVUmDH0AOdUAAM7+XAoWlCRQOztlF6C8+o2x7jvb5wwNLPvN 0UX8y0ZPeTuSBWL/Qt5WtSW0eu68CHgqTurJqD7RP6I1FuGQPl3ilCHoWfnmcTzzif wV2d9a7Q6iDUvzNsbCnaivff3VSFgwl7FYJdQcrI= From: Kieran Bingham To: libcamera devel Date: Thu, 25 Mar 2021 13:42:19 +0000 Message-Id: <20210325134231.1400051-2-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210325134231.1400051-1-kieran.bingham@ideasonboard.com> References: <20210325134231.1400051-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 11/11] 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 occurred to which request. Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- 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 34ab4be6711b..a1b014eed8d7 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_; };