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 34
34
#include "radeon_drv.h"
35
35
36
36
#include <drm/drm_pciids.h>
37
+ #include <linux/apple-gmux.h>
37
38
#include <linux/console.h>
38
39
#include <linux/module.h>
39
40
#include <linux/pm_runtime.h>
41
+ #include <linux/vgaarb.h>
40
42
#include <linux/vga_switcheroo.h>
41
43
#include <drm/drm_gem.h>
42
44
@@ -319,6 +321,15 @@ static int radeon_pci_probe(struct pci_dev *pdev,
319
321
{
320
322
int ret ;
321
323
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
+
322
333
/* Get rid of things like offb */
323
334
ret = radeon_kick_out_firmware_fb (pdev );
324
335
if (ret )
You can’t perform that action at this time.
0 commit comments