summaryrefslogtreecommitdiff
path: root/src/cam/kms_sink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cam/kms_sink.cpp')
-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()