Skip to content

Commit 07fc8e2

Browse files
committed
Fix 2009 patch to support v6.5.11 of linux
1 parent 3e8b7ae commit 07fc8e2

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

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

Lines changed: 12 additions & 9 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,19 @@ index e02b4ae..71b5cb38 100644
7374
#include <linux/debugfs.h>
7475
#include <acpi/video.h>
7576
#include <asm/io.h>
76-
@@ -105,6 +106,10 @@ struct apple_gmux_config {
77-
#define GMUX_BRIGHTNESS_MASK 0x00ffffff
78-
#define GMUX_MAX_BRIGHTNESS GMUX_BRIGHTNESS_MASK
77+
@@ -107,6 +108,11 @@ struct apple_gmux_config {
78+
79+
# define MMIO_GMUX_MAX_BRIGHTNESS 0xffff
7980

8081
+static bool force_igd;
8182
+module_param(force_igd, bool, 0);
8283
+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+
+
8385
+
8486
static u8 gmux_pio_read8(struct apple_gmux_data *gmux_data, int port)
8587
{
8688
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)
89+
@@ -945,6 +951,19 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
8890
gmux_enable_interrupts(gmux_data);
8991
gmux_read_switch_state(gmux_data);
9092

@@ -105,5 +107,6 @@ index e02b4ae..71b5cb38 100644
105107
* Retina MacBook Pros cannot switch the panel's AUX separately
106108
* and need eDP pre-calibration. They are distinguishable from
107109
--
108-
1.8.3.1
110+
2.41.0
111+
109112

0 commit comments

Comments
 (0)