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

@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Changed
- ROGCC: Don't notify user if changing to same mux mode
## [v4.5.6]
### Changed
- Fix tasks not always running correctly on boot/sleep/wake/shutdown by finishing the move to async

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();