Skip to content

Commit

Permalink
Fix 2009 patch to support v6.5.11 of linux
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeeq committed Nov 17, 2023
1 parent 6ddd76f commit 0322ab8
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions 2009-apple-gmux-allow-switching-to-igpu-at-probe.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This isn't really upstreamable, what we want upstream is the ability to
switch at runtime (so both gpus need to be able to probe the eDP panel).

Based off of work by Kerem Karabay <kekrby@gmail.com>

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

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

Expand Down Expand Up @@ -50,7 +51,7 @@ index 365e6ddbe90f..cf357cd3389d 100644
}

diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c
index f80b6ec88dc3..952652944fbd 100644
index 5a696078b382..ab8275fdc0e1 100644
--- a/drivers/pci/vgaarb.c
+++ b/drivers/pci/vgaarb.c
@@ -145,6 +145,7 @@ void vga_set_default_device(struct pci_dev *pdev)
Expand All @@ -62,7 +63,7 @@ index f80b6ec88dc3..952652944fbd 100644
/**
* vga_remove_vgacon - deactivete vga console
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index e02b4ae..71b5cb38 100644
index 1417e230edbd..3fef1afd9d24 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -21,6 +21,7 @@
Expand All @@ -73,18 +74,23 @@ index e02b4ae..71b5cb38 100644
#include <linux/debugfs.h>
#include <acpi/video.h>
#include <asm/io.h>
<<<<<<< Updated upstream
@@ -105,6 +106,10 @@ struct apple_gmux_config {
=======
@@ -107,6 +108,11 @@ struct apple_gmux_config {
>>>>>>> Stashed changes

# define MMIO_GMUX_MAX_BRIGHTNESS 0xffff

+static bool force_igd;
+module_param(force_igd, bool, 0);
+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)");
+
+
static u8 gmux_pio_read8(struct apple_gmux_data *gmux_data, int port)
{
return inb(gmux_data->iostart + port);
@@ -933,6 +938,19 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
@@ -945,6 +951,19 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
gmux_enable_interrupts(gmux_data);
gmux_read_switch_state(gmux_data);

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


0 comments on commit 0322ab8

Please sign in to comment.