Skip to content

Commit 0322ab8

Browse files
committed
Fix 2009 patch to support v6.5.11 of linux
1 parent 6ddd76f commit 0322ab8

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

2009-apple-gmux-allow-switching-to-igpu-at-probe.patch

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This isn't really upstreamable, what we want upstream is the ability to
1010
switch at runtime (so both gpus need to be able to probe the eDP panel).
1111

1212
Based off of work by Kerem Karabay <kekrby@gmail.com>
13+
1314
---
1415
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +++
1516
drivers/gpu/vga/vga_switcheroo.c | 7 +------
@@ -18,10 +19,10 @@ Based off of work by Kerem Karabay <kekrby@gmail.com>
1819
4 files changed, 24 insertions(+), 6 deletions(-)
1920

2021
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
21-
index 3fe277bc233f..ee7792a350e5 100644
22+
index e06009966428..196fcd776e24 100644
2223
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
2324
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
24-
@@ -2058,6 +2058,9 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
25+
@@ -2094,6 +2094,9 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
2526
int ret, retry = 0, i;
2627
bool supports_atomic = false;
2728

@@ -50,7 +51,7 @@ index 365e6ddbe90f..cf357cd3389d 100644
5051
}
5152

5253
diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c
53-
index f80b6ec88dc3..952652944fbd 100644
54+
index 5a696078b382..ab8275fdc0e1 100644
5455
--- a/drivers/pci/vgaarb.c
5556
+++ b/drivers/pci/vgaarb.c
5657
@@ -145,6 +145,7 @@ void vga_set_default_device(struct pci_dev *pdev)
@@ -62,7 +63,7 @@ index f80b6ec88dc3..952652944fbd 100644
6263
/**
6364
* vga_remove_vgacon - deactivete vga console
6465
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
65-
index e02b4ae..71b5cb38 100644
66+
index 1417e230edbd..3fef1afd9d24 100644
6667
--- a/drivers/platform/x86/apple-gmux.c
6768
+++ b/drivers/platform/x86/apple-gmux.c
6869
@@ -21,6 +21,7 @@
@@ -73,18 +74,23 @@ index e02b4ae..71b5cb38 100644
7374
#include <linux/debugfs.h>
7475
#include <acpi/video.h>
7576
#include <asm/io.h>
77+
<<<<<<< Updated upstream
7678
@@ -105,6 +106,10 @@ struct apple_gmux_config {
79+
=======
80+
@@ -107,6 +108,11 @@ struct apple_gmux_config {
81+
>>>>>>> Stashed changes
7782

7883
# define MMIO_GMUX_MAX_BRIGHTNESS 0xffff
7984

8085
+static bool force_igd;
8186
+module_param(force_igd, bool, 0);
8287
+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)");
88+
+
8389
+
8490
static u8 gmux_pio_read8(struct apple_gmux_data *gmux_data, int port)
8591
{
8692
return inb(gmux_data->iostart + port);
87-
@@ -933,6 +938,19 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
93+
@@ -945,6 +951,19 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
8894
gmux_enable_interrupts(gmux_data);
8995
gmux_read_switch_state(gmux_data);
9096

@@ -105,5 +111,6 @@ index e02b4ae..71b5cb38 100644
105111
* Retina MacBook Pros cannot switch the panel's AUX separately
106112
* and need eDP pre-calibration. They are distinguishable from
107113
--
108-
1.8.3.1
114+
2.41.0
115+
109116

0 commit comments

Comments
 (0)