File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 3434#include "radeon_drv.h"
3535
3636#include <drm/drm_pciids.h>
37+ #include <linux/apple-gmux.h>
3738#include <linux/console.h>
3839#include <linux/module.h>
3940#include <linux/pm_runtime.h>
41+ #include <linux/vgaarb.h>
4042#include <linux/vga_switcheroo.h>
4143#include <drm/drm_gem.h>
4244
@@ -319,6 +321,15 @@ static int radeon_pci_probe(struct pci_dev *pdev,
319321{
320322 int ret ;
321323
324+ /*
325+ * apple-gmux is needed on dual GPU MacBook Pro
326+ * to probe the panel if we're the inactive GPU.
327+ */
328+ if (IS_ENABLED (CONFIG_VGA_ARB ) && IS_ENABLED (CONFIG_VGA_SWITCHEROO ) &&
329+ apple_gmux_present () && pdev != vga_default_device () &&
330+ !vga_switcheroo_handler_flags ())
331+ return - EPROBE_DEFER ;
332+
322333 /* Get rid of things like offb */
323334 ret = radeon_kick_out_firmware_fb (pdev );
324335 if (ret )
You can’t perform that action at this time.
0 commit comments