ROGCC: Don't notify user if changing to same mux mode

This commit is contained in:
Luke D. Jones
2022-12-10 21:42:52 +13:00
parent bdb6c5b2ff
commit 8dcb209026
2 changed files with 12 additions and 0 deletions

View File

@@ -310,10 +310,19 @@ pub fn start_notifications(
e
})
.unwrap();
let mut actual_mux_mode = GpuMode::Error;
if let Ok(mode) = proxy.gpu_mux_mode().await {
actual_mux_mode = mode;
}
if let Ok(mut p) = proxy.receive_notify_gpu_mux_mode().await {
info!("Started zbus signal thread: receive_power_states");
while let Some(e) = p.next().await {
if let Ok(out) = e.args() {
if out.mode == actual_mux_mode {
continue;
}
if let Ok(mut lock) = page_states1.lock() {
lock.bios.dedicated_gfx = out.mode;
lock.set_notified();