Skip to content

Commit 1859ccb

Browse files
AdityaGarg81Naim
authored andcommitted
vga_switcheroo: Defer probe of display devices on T2 Macs
apple-gmux: allow switching to igpu at probe is causing a regression on older non T2 Macs. Constrain the vga_switcheroo probe defer to T2 Macs only. Signed-off-by: Aditya Garg <gargaditya08@live.com>
1 parent 24271a7 commit 1859ccb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/vga/vga_switcheroo.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#define pr_fmt(fmt) "vga_switcheroo: " fmt
3232

3333
#include <linux/apple-gmux.h>
34+
#include <linux/cachy-t2.h>
3435
#include <linux/console.h>
3536
#include <linux/debugfs.h>
3637
#include <linux/fb.h>
@@ -438,7 +439,8 @@ find_active_client(struct list_head *head)
438439
bool vga_switcheroo_client_probe_defer(struct pci_dev *pdev)
439440
{
440441
if (pci_is_display(pdev)) {
441-
if (apple_gmux_present() && !vgasr_priv.handler_flags)
442+
if (apple_gmux_present() && !vgasr_priv.handler_flags &&
443+
(pdev != vga_default_device() || apple_is_t2_mac()))
442444
return true;
443445
}
444446

0 commit comments

Comments
 (0)