[libcamera-devel,11/11] libcamera: pipeline: ipu3: frames: Use the request sequence
diff mbox series

Message ID 20210325134231.1400051-2-kieran.bingham@ideasonboard.com
State Superseded
Delegated to: Kieran Bingham
Headers show
Series
  • [libcamera-devel,v3,01/11] utils: ipc: proxy: Track IPA with a state machine
Related show

Commit Message

Kieran Bingham March 25, 2021, 1:42 p.m. UTC
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 <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/libcamera/pipeline/ipu3/frames.cpp | 4 +---
 src/libcamera/pipeline/ipu3/frames.h   | 1 -
 2 files changed, 1 insertion(+), 4 deletions(-)

Patch
diff mbox series

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<std::unique_ptr<FrameBuffer>> &paramBuff
 	for (const std::unique_ptr<FrameBuffer> &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<FrameBuffer *> availableParamBuffers_;
 	std::queue<FrameBuffer *> availableStatBuffers_;
 
-	unsigned int nextId_;
 	std::map<unsigned int, std::unique_ptr<Info>> frameInfo_;
 };