summaryrefslogtreecommitdiff
path: root/src/cam
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-10-03 17:22:26 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-10-05 12:03:44 +0300
commit1de0f90dd43200b0f101b8c732c35c2669d027ad (patch)
tree63303e2759edf6f637a7fa93783a04d2b2a80697 /src/cam
parent3c059b9164fdbe8188eaa466fe64f7f680c0843b (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/cam')
-rw-r--r--src/cam/kms_sink.cpp21
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()