From f2aef083fde73531d902b8b09579a1d496f6b30b Mon Sep 17 00:00:00 2001 From: AxxzyWasTaken Date: Wed, 4 Nov 2026 18:20:57 +0000 Subject: [PATCH] soc: apple: display-gate: Serve the M4 Max The gate that enables the T6041 display nodes only runs on root compatible apple,t6040, the M4 Pro. The M4 Max is apple,t6041, with the same display block at the same addresses. aura publishes the handoff there too, but no gate runs, so the nodes stay disabled and the panel stays on simpledrm. Add a gate entry for apple,t6041 that shares the T6041 code. Without the apple,t6041-handoff marker it does nothing, as before. Signed-off-by: AxxzyWasTaken --- drivers/soc/apple/Kconfig | 4 ++-- drivers/soc/apple/display-gate.c | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/soc/apple/Kconfig b/drivers/soc/apple/Kconfig index 997a9d90b105a..366d9c97162fc 100644 --- a/drivers/soc/apple/Kconfig +++ b/drivers/soc/apple/Kconfig @@ -283,7 +283,7 @@ config APPLE_DISPLAY_GATE not come up, also keeps the GPU off for that boot. It is not a display-only switch. - On T6041 (M4 Pro) device trees it enables the internal display nodes + On T6041 (M4 Pro and M4 Max) device trees it enables the internal display nodes only when the boot loader has handed the running display coprocessor over (apple,t6041-handoff, 26.6.2 display firmware), and powers up the J616s external display chain (HDMI, Type-C DisplayPort) once the @@ -296,7 +296,7 @@ config APPLE_DISPLAY_GATE meanwhile, and take the display routes once the chain is up. Say 'y' if you want the native display on M3 Pro, M3 Max, M3 and - M4 Pro Macs. + M4 Pro and M4 Max Macs. config APPLE_T6030_GPU_PMP_LINK bool diff --git a/drivers/soc/apple/display-gate.c b/drivers/soc/apple/display-gate.c index 7178412579287..e91c5e297a377 100644 --- a/drivers/soc/apple/display-gate.c +++ b/drivers/soc/apple/display-gate.c @@ -67,7 +67,8 @@ * T6031 boot the gate also logs what the boot loader handed over, so that * a boot without the option already records what the next one needs. * - * On T6041 (the display coprocessor of the M4 Pro, apple,t6040) m1n1 hands + * On T6041 (the display coprocessor of the M4 Pro, apple,t6040, and of the + * M4 Max, apple,t6041) m1n1 hands * over the DCP that iBoot leaves running. It marks the DCP, the display * subsystem and the DCP's piodma child with apple,t6041-handoff and names * the display firmware in apple,firmware-compat. There is no PMP to add or @@ -327,11 +328,23 @@ static const struct gate_soc gate_t6041 __initconst = { .run = gate_t6041_run, }; +/* The same display block on the M4 Max: root compatible apple,t6041. */ +static const struct gate_soc gate_t6041_max __initconst = { + .machine = "apple,t6041", + .prefix = "apple-t6041-display: ", + .name = "T6041", + .dcp_compat = "apple,t6041-dcp", + .display_compat = "apple,display-subsystem", + .marker = "apple,t6041-handoff", + .run = gate_t6041_run, +}; + static const struct gate_soc *const gate_socs[] __initconst = { &gate_t6030, &gate_t8122, &gate_t6031, &gate_t6041, + &gate_t6041_max, }; /* The SoC this boot runs on, if the gate serves it. */