From 14a2b897842d81395a0d50c00c7507f20c008734 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Tue, 1 Dec 2026 17:20:13 +1100 Subject: [PATCH] drm/asahi: g15: admit the T6031 GPU by SoC, not only on the J516C The T6031 configuration's machine check named apple,j516c, so every other T6031 board (the 14-inch J514C) kept its GPU off even with the native display handed over, the firmware identity accepted and the device tree filled by the boot loader. None of the checks that make a T6031 GPU start safe is per board. The first start already waits for the T6031 native display, which the display gate enables only where the boot loader marked the handoff (#3729 made that board-independent); the loaded firmware TEXT, the hardware identity and the core mask must still match; the GPU regions and every per-machine value of the hardware record (operating points, voltages, gains, power zones, sensor rows) come from the device tree the boot loader fills from this machine's ADT. The record words neither carries (maximum power, the relative-power table and the MTR masks) stay the J516C reference machine's on every board, as the T6030 templates' words already are on the J514S. That is how the J514C ran in #2148's earlier lab boots (short native GL/Vulkan and a normal login, no power or thermal qualification). Check the SoC compatible instead, as T6030 does, and update the host admission model to match. Signed-off-by: Ryan Murray --- drivers/gpu/drm/asahi/g15/hw/t6031.rs | 18 ++++++++++++++---- tools/asahi/g15-display-order-tests.py | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/asahi/g15/hw/t6031.rs b/drivers/gpu/drm/asahi/g15/hw/t6031.rs index 8bac33989db64..807241fea914f 100644 --- a/drivers/gpu/drm/asahi/g15/hw/t6031.rs +++ b/drivers/gpu/drm/asahi/g15/hw/t6031.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only OR MIT -//! T6031 (M3 Max, G15C) configuration, admitted on J516C only. +//! T6031 (M3 Max, G15C) configuration, on every T6031 board whose boot loader hands the +//! native display over. //! //! One die, four clusters of ten core slots. The firmware is the same RTKit 2419 generation as //! the T6030's and the initdata graph keeps the T6030 canonical VAs; what differs is the SoC @@ -13,6 +14,15 @@ //! value was measured on a J516C: the SGX identification //! registers, the loaded firmware segment, the device tree the boot loader hands over and the //! initdata of that machine. +//! +//! Admission is by SoC, as on T6030: the first start waits for the T6031 native display, which +//! the display gate enables only where the boot loader marked the handoff, and the loaded +//! firmware, the hardware identity, the core mask and the device tree's GPU regions must check +//! out. What is per machine comes from the device tree the boot loader fills from that +//! machine's ADT (operating points, voltages, gains, power zones, sensor rows). The few record +//! words neither carries (maximum power, relative powers, MTR masks; see `board::record`) are +//! the J516C reference machine's on every board, as the T6030 templates' machine's words are on +//! the J514S. use super::super::Config; use super::{FirmwareBuild, HwId, IoMap, Layout}; @@ -159,9 +169,9 @@ pub(crate) const CONFIG: Config = Config { ], }, ], - // The reference words and measured layout belong to the J516C, not - // every T6031 board (in particular, not the 14-inch J514C). - machine: kernel::c_str!("apple,j516c"), + // The SoC, as on T6030: the native display handoff, the firmware and hardware identity and + // the device tree decide the rest (see the module comment). + machine: kernel::c_str!("apple,t6031"), platform: super::Platform::DeviceTree, layout: &LAYOUT, board: super::Board::DeviceTree(&super::super::board::record::J516C), diff --git a/tools/asahi/g15-display-order-tests.py b/tools/asahi/g15-display-order-tests.py index cd4323903e76a..3c611a60c1e44 100644 --- a/tools/asahi/g15-display-order-tests.py +++ b/tools/asahi/g15-display-order-tests.py @@ -400,7 +400,7 @@ def c_source(root): ''' RS_MAIN = r''' -static T6031: Config = Config { platform: hw::Platform::DeviceTree, machine: "apple,j516c", name: "T6031 G15C", firmware: (), board: hw::Board::Blob }; +static T6031: Config = Config { platform: hw::Platform::DeviceTree, machine: "apple,t6031", name: "T6031 G15C", firmware: (), board: hw::Board::Blob }; static T6030: Config = Config { platform: hw::Platform::AdtWithPmp, machine: "apple,t6030", name: "T6030 G15S", firmware: (), board: hw::Board::Templates }; const TAIL: [&str; 6] = ["adt", "identity", "coherent", "board_images", "regs", "hold"]; fn run(cfg: &'static Config, machine: bool, pmp: i32, display: i32) -> (Result<()>, Vec<&'static str>) {