drm: log initial surface parameters

This commit is contained in:
Victor Brekenfeld 2020-05-11 22:22:37 +02:00
parent 2128f68847
commit 9610f31e44
2 changed files with 11 additions and 1 deletions

View File

@ -66,6 +66,11 @@ impl<A: AsRawFd + 'static> AtomicDrmSurfaceInternal<A> {
connectors: &[connector::Handle], connectors: &[connector::Handle],
logger: ::slog::Logger, logger: ::slog::Logger,
) -> Result<Self, Error> { ) -> Result<Self, Error> {
info!(
logger,
"Initializing drm surface with mode {:?} and connectors {:?}", mode, connectors
);
let crtc_info = dev.get_crtc(crtc).compat().map_err(|source| Error::Access { let crtc_info = dev.get_crtc(crtc).compat().map_err(|source| Error::Access {
errmsg: "Error loading crtc info", errmsg: "Error loading crtc info",
dev: dev.dev_path(), dev: dev.dev_path(),
@ -510,7 +515,7 @@ impl<A: AsRawFd + 'static> RawSurface for AtomicDrmSurfaceInternal<A> {
self.logger, self.logger,
"New screen configuration invalid!:\n\t{:#?}\n\t{}\n", req, err "New screen configuration invalid!:\n\t{:#?}\n\t{}\n", req, err
); );
return Err(err); return Err(err);
} else { } else {
if current.mode != pending.mode { if current.mode != pending.mode {

View File

@ -311,6 +311,11 @@ impl<A: AsRawFd + 'static> LegacyDrmSurfaceInternal<A> {
connectors: &[connector::Handle], connectors: &[connector::Handle],
logger: ::slog::Logger, logger: ::slog::Logger,
) -> Result<LegacyDrmSurfaceInternal<A>, Error> { ) -> Result<LegacyDrmSurfaceInternal<A>, Error> {
info!(
logger,
"Initializing drm surface with mode {:?} and connectors {:?}", mode, connectors
);
// Try to enumarate the current state to set the initial state variable correctly // Try to enumarate the current state to set the initial state variable correctly
let crtc_info = dev.get_crtc(crtc).compat().map_err(|source| Error::Access { let crtc_info = dev.get_crtc(crtc).compat().map_err(|source| Error::Access {
errmsg: "Error loading crtc info", errmsg: "Error loading crtc info",