[libcamera-devel] [PATCH] cam: kms_sink: Print display pipeline configuration

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Oct 4 10:17:52 CEST 2021


Hi Paul,

On Mon, Oct 04, 2021 at 02:20:10PM +0900, paul.elder at ideasonboard.com wrote:
> On Sun, Oct 03, 2021 at 05:46:00PM +0300, Laurent Pinchart wrote:
> > It can be useful, for diagnosis purpose, to know what plane and CRTC the
> > KMS sink auto-selects. Print the display pipeline configuration at start
> > time.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> 
> Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
> 
> > ---
> >  src/cam/kms_sink.cpp | 21 +++++++++++++++------
> >  1 file changed, 15 insertions(+), 6 deletions(-)
> > 
> > diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp
> > index 658192efc105..d30fba783c96 100644
> > --- a/src/cam/kms_sink.cpp
> > +++ b/src/cam/kms_sink.cpp
> > @@ -174,24 +174,33 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
> >  					crtc_ = crtc;
> >  					plane_ = plane;
> >  					format_ = format;
> > -					return 0;
> > +					break;
> >  				}
> >  
> >  				if (plane->supportsFormat(xFormat)) {
> >  					crtc_ = crtc;
> >  					plane_ = plane;
> >  					format_ = xFormat;
> > -					return 0;
> > +					break;
> >  				}
> >  			}
> >  		}
> >  	}
> >  
> > -	std::cerr
> > -		<< "Unable to find display pipeline for format "
> > -		<< format.toString() << std::endl;
> > +	if (!crtc_) {
> > +		std::cerr
> > +			<< "Unable to find display pipeline for format "
> > +			<< format.toString() << std::endl;
> >  
> > -	return -EPIPE;
> > +		return -EPIPE;
> > +	}
> > +
> > +	std::cout
> > +		<< "Using KMS plane " << plane_->id() << ", CRTC " << crtc_->id()
> > +		<< ", connector " << connector_->name()
> > +		<< " (" << connector_->id() << ")" << std::endl;
> > +
> > +	return 0;
> >  }
> >  
> >  int KMSSink::start()
> > 
> > base-commit: c286b00aa1eb9331c3bab2b35905dcf2e4ccde66
> 
> What's all this?

A clear mistake of my side, picking the wrong base commit :-) I've
turned on --base=auto by default for git-format-patch, and still getting
used to it.

> > prerequisite-patch-id: 6f9cf7056835b21e2cf702220936c2029f844490
> > prerequisite-patch-id: d490b0cac488507940b61e10e9fbd6a58f81b3ad
> > prerequisite-patch-id: 7ddc6b194b8e5282e45331e58354d7f3e9ae7a1c

[snip]

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list