diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-10-03 17:22:26 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-10-05 12:03:44 +0300 |
commit | 1de0f90dd43200b0f101b8c732c35c2669d027ad (patch) | |
tree | 63303e2759edf6f637a7fa93783a04d2b2a80697 /src | |
parent | 3c059b9164fdbe8188eaa466fe64f7f680c0843b (diff) |
cam: kms_sink: Print display pipeline configuration
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@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/cam/kms_sink.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp index 658192ef..d30fba78 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() |