[PATCH v2 RESEND] drm/amdgpu: register a vga_switcheroo client for MacBooks with apple-gmux

2023-03-03 Thread Orlando Chamberlain
26.9834-10-orlandoch@gmail.com/ Signed-off-by: Orlando Chamberlain --- v1->v2: Use apple_gmux_detect() drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/dri

Re: [PATCHv2] drm/amdgpu: register a vga_switcheroo client for MacBooks with apple-gmux

2023-02-17 Thread Orlando Chamberlain
On Thu, 16 Feb 2023 09:52:57 -0500 Alex Deucher wrote: > On Thu, Feb 16, 2023 at 8:45 AM Orlando Chamberlain > wrote: > > > > Commit 3840c5bcc245 ("drm/amdgpu: disentangle runtime pm and > > vga_switcheroo") made amdgpu only register a vga_switcheroo client

[PATCHv2] drm/amdgpu: register a vga_switcheroo client for MacBooks with apple-gmux

2023-02-16 Thread Orlando Chamberlain
26.9834-10-orlandoch@gmail.com/ Signed-off-by: Orlando Chamberlain --- v1->v2: Use apple_gmux_detect() drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/dri

Re: [RFC PATCH 7/9] apple-gmux: add sysfs interface

2023-02-10 Thread Orlando Chamberlain
On Fri, 10 Feb 2023 21:23:15 +0100 Hans de Goede wrote: > Hi, > > On 2/10/23 21:15, Hans de Goede wrote: > > Hi, > > > > On 2/10/23 05:48, Orlando Chamberlain wrote: > >> Allow reading gmux ports from userspace. When the unsafe module > >> parame

Re: [RFC PATCH 1/9] apple-gmux: use cpu_to_be32 instead of manual reorder

2023-02-10 Thread Orlando Chamberlain
On Fri, 10 Feb 2023 20:19:27 +0100 Hans de Goede wrote: > Hi, > > On 2/10/23 20:09, Hans de Goede wrote: > > Hi, > > > > On 2/10/23 05:48, Orlando Chamberlain wrote: > >> Currently it manually flips the byte order, but we can instead use > >> cp

Re: [RFC PATCH 5/9] apple-gmux: Use GMSP acpi method for interrupt clear

2023-02-10 Thread Orlando Chamberlain
On Fri, 10 Feb 2023 20:43:58 +0100 Hans de Goede wrote: > Hi, > > On 2/10/23 05:48, Orlando Chamberlain wrote: > > This is needed for interrupts to be cleared correctly on MMIO based > > gmux's. It is untested if this helps/hinders other gmux types, but I > >

Re: [RFC PATCH 2/9] apple-gmux: consolidate version reading

2023-02-10 Thread Orlando Chamberlain
On Fri, 10 Feb 2023 20:41:19 +0100 Hans de Goede wrote: > Hi, > > On 2/10/23 05:48, Orlando Chamberlain wrote: > > Read gmux version in one go as 32 bits on both indexed and classic > > gmux's. > > > > Classic gmux's used to read the version as > > >

Re: [RFC PATCH 9/9] drm/amdgpu: register a vga_switcheroo client for all GPUs that are not thunderbolt attached

2023-02-10 Thread Orlando Chamberlain
On Fri, 10 Feb 2023 11:37:08 -0500 Alex Deucher wrote: > On Fri, Feb 10, 2023 at 11:07 AM Hans de Goede > wrote: > > > > Hi, > > > > On 2/10/23 16:53, Alex Deucher wrote: > > > On Fri, Feb 10, 2023 at 3:04 AM Orlando Chamberlain > >

[RFC PATCH 9/9] drm/amdgpu: register a vga_switcheroo client for all GPUs that are not thunderbolt attached

2023-02-10 Thread Orlando Chamberlain
apple-gmux. Revert to the old logic of registering for all non-thunderbolt gpus, like radeon and nouveau. Fixes: 3840c5bcc245 ("drm/amdgpu: disentangle runtime pm and vga_switcheroo") Signed-off-by: Kerem Karabay [Orlando Chamberlain : add commit description] Signed-off-by: Orlando Chamberla

[RFC PATCH 4/9] apple-gmux: refactor gmux types

2023-02-10 Thread Orlando Chamberlain
Add apple_gmux_config struct containing operations and data specific to each mux type. This is in preparation for adding a third, MMIO based, gmux type. Signed-off-by: Orlando Chamberlain --- drivers/platform/x86/apple-gmux.c | 91 --- include/linux/apple-gmux.h

[RFC PATCH 0/9] apple-gmux: support MMIO gmux type on T2 Macs

2023-02-10 Thread Orlando Chamberlain
555.ga31...@srcf.ucam.org/ Kerem Karabay (1): drm/amdgpu: register a vga_switcheroo client for all GPUs that are not thunderbolt attached Orlando Chamberlain (8): apple-gmux: use cpu_to_be32 instead of manual reorder apple-gmux: consolidate version reading apple-gmux: use first bit t

[RFC PATCH 2/9] apple-gmux: consolidate version reading

2023-02-10 Thread Orlando Chamberlain
reading code is used for classic and indexed gmux's (as well as mmio gmux's that will be added to this driver). Signed-off-by: Orlando Chamberlain --- drivers/platform/x86/apple-gmux.c | 14 ++ include/linux/apple-gmux.h| 6 +- 2 files changed, 7 insertions(+), 13

[RFC PATCH 7/9] apple-gmux: add sysfs interface

2023-02-10 Thread Orlando Chamberlain
ion information (0005 in this case) Signed-off-by: Orlando Chamberlain --- drivers/platform/x86/apple-gmux.c | 129 ++ 1 file changed, 129 insertions(+) diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c index c38d6ef0c

[RFC PATCH 1/9] apple-gmux: use cpu_to_be32 instead of manual reorder

2023-02-10 Thread Orlando Chamberlain
Currently it manually flips the byte order, but we can instead use cpu_to_be32(val) for this. Signed-off-by: Orlando Chamberlain --- drivers/platform/x86/apple-gmux.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/platform/x86/apple-gmux.c b

[RFC PATCH 8/9] hda/hdmi: Register with vga_switcheroo on Dual GPU Macbooks

2023-02-10 Thread Orlando Chamberlain
ar to ATPX, we use the presence of an acpi method (PWRD in this case) to ensure we only register with the correct devices. Fixes: 586bc4aab878 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD") Signed-off-by: Orlando Chamberlain --- sound/pci/hda/hda_intel.c | 19 +++

[RFC PATCH 3/9] apple-gmux: use first bit to check switch state

2023-02-10 Thread Orlando Chamberlain
, check the first bit to determine the connected gpu. As T2 Macs with gmux only can switch the internal display, it is untested if this change (or a similar change) would be applicable to GMUX_PORT_SWITCH_DDC and GMUX_PORT_SWITCH_EXTERNAL. Signed-off-by: Orlando Chamberlain --- drivers/platform/x86

[RFC PATCH 5/9] apple-gmux: Use GMSP acpi method for interrupt clear

2023-02-10 Thread Orlando Chamberlain
done on MMIO gmux's. There is also a "GMLV" acpi method, and the "GMSP" method can be called with 1 as its argument, but the purposes of these aren't known and they don't seem to be needed. Signed-off-by: Orlando Chamberlain --- drivers/platform/x86/apple-gmux.c | 26 +

[RFC PATCH 6/9] apple-gmux: support MMIO gmux on T2 Macs

2023-02-10 Thread Orlando Chamberlain
ails in amdgpu's code for bringing the gpu back online. Signed-off-by: Orlando Chamberlain --- drivers/platform/x86/apple-gmux.c | 134 -- include/linux/apple-gmux.h| 34 +--- 2 files changed, 149 insertions(+), 19 deletions(-) diff --git a/drivers/platform/x86/a

Re: [BUG] AMD Radeon Pro 5600M with 8GB of HBM2 memory shows blank screen on Linux

2022-12-28 Thread Orlando Chamberlain
On Mon, 26 Dec 2022 21:44:06 +1100 "Aditya Garg" wrote: > The AMD Radeon Pro 5600M with 8GB of HBM2 memory GPU is found in > MacBook Pro 16 inch, 2019 (MacBookPro16,4). > > The GPU fails to work on Linux, thus a blank black screen gets > displayed on boot. > > If nomodeset is added as a kernel