gfx: tmp informational only store of vfio/compute mode

This commit is contained in:
Luke D. Jones
2021-05-18 09:54:26 +12:00
parent 7771c6b8da
commit ba03e8feb8
4 changed files with 24 additions and 12 deletions

View File

@@ -145,10 +145,9 @@ fn start_daemon() -> Result<(), Box<dyn Error>> {
// Need to check if a laptop has the dedicated gfx switch
if CtrlRogBios::has_dedicated_gfx_toggle() {
if let Ok(ded) = CtrlRogBios::get_gfx_mode() {
if let Ok(mut config) = config.lock() {
if let Ok(config) = config.lock() {
if ded == 1 {
warn!("Dedicated GFX toggle is on but driver mode is not nvidia \nSetting to nvidia driver mode");
config.gfx_last_mode = config.gfx_mode;
let devices = ctrl.devices();
let bus = ctrl.bus();
CtrlGraphics::do_vendor_tasks(
@@ -162,7 +161,7 @@ fn start_daemon() -> Result<(), Box<dyn Error>> {
let devices = ctrl.devices();
let bus = ctrl.bus();
CtrlGraphics::do_vendor_tasks(
config.gfx_last_mode,
config.gfx_mode,
false,
&devices,
&bus,