drm: do not ignore events for inactive devices

This commit is contained in:
Victor Brekenfeld 2020-05-03 17:23:12 +02:00
parent 49215f6a3d
commit 1a5cc59983
2 changed files with 26 additions and 38 deletions

View File

@ -389,7 +389,6 @@ impl<A: AsRawFd + 'static> Device for AtomicDrmDevice<A> {
for event in events { for event in events {
if let Event::PageFlip(event) = event { if let Event::PageFlip(event) = event {
trace!(self.logger, "Got a page-flip event for crtc ({:?})", event.crtc); trace!(self.logger, "Got a page-flip event for crtc ({:?})", event.crtc);
if self.active.load(Ordering::SeqCst) {
if self if self
.backends .backends
.borrow() .borrow()
@ -406,13 +405,6 @@ impl<A: AsRawFd + 'static> Device for AtomicDrmDevice<A> {
} else { } else {
self.backends.borrow_mut().remove(&event.crtc); self.backends.borrow_mut().remove(&event.crtc);
} }
} else {
debug!(
self.logger,
"Device ({:?}) not active. Ignoring PageFlip",
self.dev_path()
);
}
} else { } else {
trace!( trace!(
self.logger, self.logger,

View File

@ -306,7 +306,6 @@ impl<A: AsRawFd + 'static> Device for LegacyDrmDevice<A> {
Ok(events) => { Ok(events) => {
for event in events { for event in events {
if let Event::PageFlip(event) = event { if let Event::PageFlip(event) = event {
if self.active.load(Ordering::SeqCst) {
if self if self
.backends .backends
.borrow() .borrow()
@ -323,9 +322,6 @@ impl<A: AsRawFd + 'static> Device for LegacyDrmDevice<A> {
} else { } else {
self.backends.borrow_mut().remove(&event.crtc); self.backends.borrow_mut().remove(&event.crtc);
} }
} else {
debug!(self.logger, "Device not active. Ignoring PageFlip");
}
} else { } else {
trace!(self.logger, "Unrelated event"); trace!(self.logger, "Unrelated event");
} }