metal: make post_commit_margin configurable
This commit is contained in:
parent
76b0f2f734
commit
02ece60909
24 changed files with 224 additions and 55 deletions
|
|
@ -35,7 +35,7 @@ use {
|
|||
set_vrr_mode, Connector, DrmDevice,
|
||||
},
|
||||
},
|
||||
std::{cell::RefCell, io::ErrorKind, path::PathBuf, rc::Rc},
|
||||
std::{cell::RefCell, io::ErrorKind, path::PathBuf, rc::Rc, time::Duration},
|
||||
};
|
||||
|
||||
fn default_seat() -> Seat {
|
||||
|
|
@ -245,6 +245,9 @@ impl ConfigDrmDevice {
|
|||
if let Some(dse) = self.direct_scanout_enabled {
|
||||
d.set_direct_scanout_enabled(dse);
|
||||
}
|
||||
if let Some(fm) = self.flip_margin_ms {
|
||||
d.set_flip_margin(Duration::from_nanos((fm * 1_000_000.0) as _));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue