[libcamera-devel,v1] pipeline: raspberrypi: Demote the category of a logging message
diff mbox series

Message ID 20220110102342.867402-1-naush@raspberrypi.com
State Accepted
Commit eff9de397ac37e948e5ca603814fcaba9bcd8df5
Headers show
Series
  • [libcamera-devel,v1] pipeline: raspberrypi: Demote the category of a logging message
Related show

Commit Message

Naushir Patuck Jan. 10, 2022, 10:23 a.m. UTC
Switch the "no buffers available" log message from Info to Debug so that it does
not get output by default.

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

Comments

David Plowman Jan. 10, 2022, 1:44 p.m. UTC | #1
Hi Naush

Thanks for the patch!

On Mon, 10 Jan 2022 at 10:23, Naushir Patuck <naush@raspberrypi.com> wrote:
>
> Switch the "no buffers available" log message from Info to Debug so that it does
> not get output by default.
>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> ---
>  src/libcamera/pipeline/raspberrypi/rpi_stream.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> index bab80d25ad1a..a4159e20b068 100644
> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> @@ -130,8 +130,8 @@ int Stream::queueBuffer(FrameBuffer *buffer)
>          */
>         if (!buffer) {
>                 if (availableBuffers_.empty()) {
> -                       LOG(RPISTREAM, Info) << "No buffers available for "
> -                                               << name_;
> +                       LOG(RPISTREAM, Debug) << "No buffers available for "
> +                                             << name_;

Yes, I agree this makes sense along with that other little fix that we
talked about (making the embedded data stream non-external).

Reviewed-by: David Plowman <david.plowman@raspberrypi.com>

Thanks!
David

>                         /*
>                          * Note that we need to queue an internal buffer as soon
>                          * as one becomes available.
> --
> 2.25.1
>
Laurent Pinchart Jan. 10, 2022, 2:13 p.m. UTC | #2
Hi Naush,

Thank you for the patch.

On Mon, Jan 10, 2022 at 10:23:42AM +0000, Naushir Patuck wrote:
> Switch the "no buffers available" log message from Info to Debug so that it does
> not get output by default.
> 
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/libcamera/pipeline/raspberrypi/rpi_stream.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> index bab80d25ad1a..a4159e20b068 100644
> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> @@ -130,8 +130,8 @@ int Stream::queueBuffer(FrameBuffer *buffer)
>  	 */
>  	if (!buffer) {
>  		if (availableBuffers_.empty()) {
> -			LOG(RPISTREAM, Info) << "No buffers available for "
> -						<< name_;
> +			LOG(RPISTREAM, Debug) << "No buffers available for "
> +					      << name_;
>  			/*
>  			 * Note that we need to queue an internal buffer as soon
>  			 * as one becomes available.
Kieran Bingham Jan. 10, 2022, 2:41 p.m. UTC | #3
Quoting Naushir Patuck (2022-01-10 10:23:42)
> Switch the "no buffers available" log message from Info to Debug so that it does
> not get output by default.
> 

I can imagine this is causing unnecessary concern with users?

And I believe it's valid for streams to not have a buffer when queueing
a request in all cases, so I think this is reasonable.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> ---
>  src/libcamera/pipeline/raspberrypi/rpi_stream.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> index bab80d25ad1a..a4159e20b068 100644
> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> @@ -130,8 +130,8 @@ int Stream::queueBuffer(FrameBuffer *buffer)
>          */
>         if (!buffer) {
>                 if (availableBuffers_.empty()) {
> -                       LOG(RPISTREAM, Info) << "No buffers available for "
> -                                               << name_;
> +                       LOG(RPISTREAM, Debug) << "No buffers available for "
> +                                             << name_;
>                         /*
>                          * Note that we need to queue an internal buffer as soon
>                          * as one becomes available.
> -- 
> 2.25.1
>
Naushir Patuck Jan. 10, 2022, 3:43 p.m. UTC | #4
Hi Kieran,

Thanks for the review!

On Mon, 10 Jan 2022 at 14:41, Kieran Bingham <
kieran.bingham@ideasonboard.com> wrote:

> Quoting Naushir Patuck (2022-01-10 10:23:42)
> > Switch the "no buffers available" log message from Info to Debug so that
> it does
> > not get output by default.
> >
>
> I can imagine this is causing unnecessary concern with users?
>

This is exactly the reason for this change :-)

Naush


>
> And I believe it's valid for streams to not have a buffer when queueing
> a request in all cases, so I think this is reasonable.
>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>
> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> > ---
> >  src/libcamera/pipeline/raspberrypi/rpi_stream.cpp | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> > index bab80d25ad1a..a4159e20b068 100644
> > --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> > +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> > @@ -130,8 +130,8 @@ int Stream::queueBuffer(FrameBuffer *buffer)
> >          */
> >         if (!buffer) {
> >                 if (availableBuffers_.empty()) {
> > -                       LOG(RPISTREAM, Info) << "No buffers available
> for "
> > -                                               << name_;
> > +                       LOG(RPISTREAM, Debug) << "No buffers available
> for "
> > +                                             << name_;
> >                         /*
> >                          * Note that we need to queue an internal buffer
> as soon
> >                          * as one becomes available.
> > --
> > 2.25.1
> >
>

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
index bab80d25ad1a..a4159e20b068 100644
--- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
+++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
@@ -130,8 +130,8 @@  int Stream::queueBuffer(FrameBuffer *buffer)
 	 */
 	if (!buffer) {
 		if (availableBuffers_.empty()) {
-			LOG(RPISTREAM, Info) << "No buffers available for "
-						<< name_;
+			LOG(RPISTREAM, Debug) << "No buffers available for "
+					      << name_;
 			/*
 			 * Note that we need to queue an internal buffer as soon
 			 * as one becomes available.