[libcamera-devel,v3,03/10] libcamera: pipeline: raspberrypi: Add some debug logging

Message ID 20200717085410.732308-4-naush@raspberrypi.com
State Superseded
Headers show
Series
  • Zero-copy RAW stream work
Related show

Commit Message

Naushir Patuck July 17, 2020, 8:54 a.m. UTC
No functional changes, only added some more trace points.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Niklas Söderlund July 18, 2020, 3:11 p.m. UTC | #1
Hi Naushir,

Thanks for your work.

On 2020-07-17 09:54:03 +0100, Naushir Patuck wrote:
> No functional changes, only added some more trace points.
> 
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index 3884d93d..56b7ee99 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -1183,6 +1183,11 @@ void RPiCameraData::ispInputDequeue(FrameBuffer *buffer)
>  	if (state_ == State::Stopped)
>  		return;
>  
> +	LOG(RPI, Debug) << "Stream ISP Input buffer complete"
> +			<< ", buffer id " << buffer->cookie()
> +			<< ", timestamp: " << buffer->metadata().timestamp;
> +
> +	/* The ISP input buffer gets re-queued into Unicam. */
>  	handleStreamBuffer(buffer, &unicam_[Unicam::Image]);
>  	handleState();
>  }
> @@ -1347,6 +1352,8 @@ void RPiCameraData::checkRequestCompleted()
>  		pipe_->completeRequest(camera_, request);
>  		requestQueue_.pop_front();
>  		requestCompleted = true;
> +
> +		LOG(RPI, Debug) << "Request is complete";
>  	}
>  
>  	/*
> @@ -1485,7 +1492,7 @@ FrameBuffer *RPiCameraData::updateQueue(std::queue<FrameBuffer *> &q, uint64_t t
>  		if (b->metadata().timestamp < timestamp) {
>  			q.pop();
>  			dev->queueBuffer(b);
> -			LOG(RPI, Error) << "Dropping input frame!";
> +			LOG(RPI, Warning) << "Dropping input frame!";
>  		} else if (b->metadata().timestamp == timestamp) {
>  			/* The calling function will pop the item from the queue. */
>  			return b;
> -- 
> 2.25.1
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 3884d93d..56b7ee99 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -1183,6 +1183,11 @@  void RPiCameraData::ispInputDequeue(FrameBuffer *buffer)
 	if (state_ == State::Stopped)
 		return;
 
+	LOG(RPI, Debug) << "Stream ISP Input buffer complete"
+			<< ", buffer id " << buffer->cookie()
+			<< ", timestamp: " << buffer->metadata().timestamp;
+
+	/* The ISP input buffer gets re-queued into Unicam. */
 	handleStreamBuffer(buffer, &unicam_[Unicam::Image]);
 	handleState();
 }
@@ -1347,6 +1352,8 @@  void RPiCameraData::checkRequestCompleted()
 		pipe_->completeRequest(camera_, request);
 		requestQueue_.pop_front();
 		requestCompleted = true;
+
+		LOG(RPI, Debug) << "Request is complete";
 	}
 
 	/*
@@ -1485,7 +1492,7 @@  FrameBuffer *RPiCameraData::updateQueue(std::queue<FrameBuffer *> &q, uint64_t t
 		if (b->metadata().timestamp < timestamp) {
 			q.pop();
 			dev->queueBuffer(b);
-			LOG(RPI, Error) << "Dropping input frame!";
+			LOG(RPI, Warning) << "Dropping input frame!";
 		} else if (b->metadata().timestamp == timestamp) {
 			/* The calling function will pop the item from the queue. */
 			return b;