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

View File

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