atomic: do not revert on failing state

This commit is contained in:
Victor Brekenfeld 2020-05-05 23:50:02 +02:00
parent f1c40f7306
commit 7c4ca4e524
1 changed files with 3 additions and 13 deletions

View File

@ -454,7 +454,7 @@ impl<A: AsRawFd + 'static> RawSurface for AtomicDrmSurfaceInternal<A> {
}
let mut current = self.state.write().unwrap();
let mut pending = self.pending.write().unwrap();
let pending = self.pending.write().unwrap();
debug!(
self.logger,
@ -510,18 +510,8 @@ impl<A: AsRawFd + 'static> RawSurface for AtomicDrmSurfaceInternal<A> {
self.logger,
"New screen configuration invalid!:\n\t{:#?}\n\t{}\n", req, err
);
info!(self.logger, "Reverting back to last know good state");
*pending = current.clone();
self.build_request(
&mut [].iter(),
&mut [].iter(),
&self.planes,
Some(framebuffer),
Some(current.mode),
Some(current.blob),
)?
return Err(err);
} else {
if current.mode != pending.mode {
if let Err(err) = self.dev.destroy_property_blob(current.blob.into()) {