kms: Fix frame scheduling

This commit is contained in:
Victoria Brekenfeld 2024-06-27 18:15:18 +02:00
parent 5617f3228b
commit 8da3ac6d75
4 changed files with 25 additions and 17 deletions

View file

@ -316,6 +316,7 @@ fn get_manufacturer(vendor: &[char; 3]) -> &'static str {
}
}
// Returns refresh rate in milliherz
pub fn calculate_refresh_rate(mode: Mode) -> u32 {
let htotal = mode.hsync().2 as u32;
let vtotal = mode.vsync().2 as u32;