diff --git a/2009-apple-gmux-allow-switching-to-igpu-at-probe.patch b/2009-apple-gmux-allow-switching-to-igpu-at-probe.patch index 186051f..b4f646d 100644 --- a/2009-apple-gmux-allow-switching-to-igpu-at-probe.patch +++ b/2009-apple-gmux-allow-switching-to-igpu-at-probe.patch @@ -24,7 +24,7 @@ index 3fe277bc233f..ee7792a350e5 100644 @@ -2058,6 +2058,9 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, int ret, retry = 0, i; bool supports_atomic = false; - + + if (vga_switcheroo_client_probe_defer(pdev)) + return -EPROBE_DEFER; + @@ -48,7 +48,7 @@ index 365e6ddbe90f..cf357cd3389d 100644 + if (apple_gmux_present() && !vgasr_priv.handler_flags) return true; } - + diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c index f80b6ec88dc3..952652944fbd 100644 --- a/drivers/pci/vgaarb.c @@ -58,25 +58,25 @@ index f80b6ec88dc3..952652944fbd 100644 vga_default = pci_dev_get(pdev); } +EXPORT_SYMBOL_GPL(vga_set_default_device); - + /** * vga_remove_vgacon - deactivete vga console diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c index 4cbdc9f9bd10..008d215dd2d5 100644 --- a/drivers/platform/x86/apple-gmux.c +++ b/drivers/platform/x86/apple-gmux.c -@@ -22,6 +22,7 @@ +@@ -21,7 +21,6 @@ #include #include #include +#include #include #include - -@@ -99,6 +100,10 @@ struct apple_gmux_config { + +@@ -106,10 +105,6 @@ struct apple_gmux_config { #define GMUX_BRIGHTNESS_MASK 0x00ffffff #define GMUX_MAX_BRIGHTNESS GMUX_BRIGHTNESS_MASK - + +static bool force_igd; +module_param(force_igd, bool, 0); +MODULE_PARM_DESC(force_idg, "Switch gpu to igd on module load. Make sure that you have apple-set-os set up and the iGPU is in `lspci -s 00:02.0`. (default: false) (bool)"); @@ -84,10 +84,10 @@ index 4cbdc9f9bd10..008d215dd2d5 100644 static u8 gmux_pio_read8(struct apple_gmux_data *gmux_data, int port) { return inb(gmux_data->iostart + port); -@@ -938,6 +943,20 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) +@@ -938,19 +933,6 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) gmux_enable_interrupts(gmux_data); gmux_read_switch_state(gmux_data); - + + + if (force_igd) { + struct pci_dev *pdev; @@ -105,6 +105,6 @@ index 4cbdc9f9bd10..008d215dd2d5 100644 /* * Retina MacBook Pros cannot switch the panel's AUX separately * and need eDP pre-calibration. They are distinguishable from --- +-- 2.39.1