Repository navigation
Conversation
Add the T6031 GPU and its ASC mailbox from the J516C device tree: the register windows, the seven GPU interrupts and the four mailbox interrupts in the four-cell AIC form, the gfx power domain, and placeholders for the UAT regions, the operating points with one voltage per cluster, and the CS and AFR operating points. Both nodes stay disabled; the boot loader fills the rest from each machine's device tree, adds the firmware segments itself, and enables them, as on T8122. The 14-core T6034 has another GPU, so give its node a compatible no driver binds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> (cherry picked from commit fbb8698)
The T6031 (M3 Max) GPU mailbox carries only apple,t6031-agx-asc-mailbox,
like the T6030 and T8122 ones, so that kernels without M3 Max GPU
support leave it unbound. But no driver matched it at all: with the boot
loader's GPU handoff the mailbox was enabled yet never bound, so the
G15C start deferred at its coprocessor setup forever ("refused at the
GPU coprocessor setup (RTKit/mailbox) (EPROBE_DEFER)" on all four start
variants of the .911 M3 Max kit on a J516C). Match it the same way. It
uses the same ASC mailbox registers.
The T6031 device tree keeps that mailbox disabled. Only a boot loader
that hands the GPU over enables it, so this changes nothing on a normal
boot.
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
(cherry picked from commit ebe56664433a392f5865417c423e82574aff6e5f)
The T6031 GPU is the same firmware generation as the T6030's (RTKit 2419, the same initdata graph and canonical VAs) on a different SoC: four clusters of ten core slots, so the enabled-core mask is two words (+0xe01500 and +0xe01504), identity words 0x07041100/0x0021040a, revision 0x12, and the GPU is powered by its power domain alone (there is no PMP vote on this SoC). Its GPU node is in the kernel device tree, filled by the boot loader (the UAT regions, the loaded firmware segments as fw-text and fw-data with their VAs, and the operating points), so the regions do not come from an ADT export. Make the SoC-specific parts of the G15 driver a property of the configuration row instead of module constants: the machine check and the PMP vote (Platform), the source of the regions (the ADT export or the GPU node), the initdata placement that differs between firmware builds (Layout: root version, HardwareData VA, size, cached prefix and fourth view, the IOMapping table), the board images (Board) and the compute register values that scale with the cluster count (ComputeRegs). The identity read fills one core mask per cluster, up to four, and GET_PARAMS reports as many as the SoC has. Add the T6031 row matched by apple,agx-t6031. It carries no firmware pin and no board data yet, so admission prints the measured TEXT identity and stops before anything firmware-visible. The T6030 row keeps every value it had; its behaviour is unchanged. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
The GPU firmware TEXT a J516C's macOS 14.7 boot chain leaves loaded (iBoot-10151.140.19.700.2, RTKit-2419.140.12.release): TEXT 0x64000 and DATA 0x140000 bytes, the GKTS entropy marker at 0x5cf28, SHA-256 of TEXT with the 8 entropy bytes zeroed c26ec89c1150eb6549cf602e012d0c5f49eb756e896d6bb8342cb2c5d98b332c, measured on the loaded segment of a J516C. The same machine started through a macOS 14.8.x chain carries a different stub whose full digest has not been recorded. For that case, and for the next build of either stub, add g15_accept_text_prefix: an unpinned build whose digest starts with the given 8 bytes is admitted for that boot with a warning that prints its full identity, so it can be pinned by the next kernel without a second measurement boot. Off by default. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
The T6030 board templates do not fit the T6031: its HardwareData record is 0xb480 bytes (the fourth HardwareDataB view at +0xb400), its root version word is 0x0c08e21e84820490, its IOMapping table has 17 slots at the T6031 register blocks (Fender at sgx+0xd00000 with a 0x144000 window, eight 0xd8000 memory-cache instances, the clock generator at sgx+0xe1c000, the ANE doorbell at 0x3c945c000, ...), it has four per-cluster voltage tables, and hundreds of its words differ from the two-cluster image. Everything here was read on a J516C: the device tree the boot loader hands over, the SGX registers and that machine's initdata. Give the T6031 row its layout and IO table (VAs packed from 0xfffffc2068000000 as the T6030 table is) and take its three board images from one firmware file, asahi/t6031-j516c-board.bin, pinned by SHA-256 and built into the kernel with CONFIG_EXTRA_FIRMWARE: the images that machine's firmware accepted, as the earlier J516C driver uploaded them. The build checks the file's IOMapping records against the layout, then writes what it owns: the TTBAT address, the IOMapping VAs, the timestamp arena, the creation timestamp and the idle policy. The HardwareData object is placed 16-byte aligned (0xfffffc20406fb580) and mapped ASC-cached as a whole: the firmware's MTR alarm handler does a 64-bit atomic in HardwareDataA, which faulted at the T6030 placement on T8122. The T6030 path (templates, DVFS from the ADT, the S8 request words) is unchanged. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
The compute work image carries four cluster-sized register values that the two-cluster G15S values get wrong on the four-cluster G15C, where they fault the first job: the saved-state pointers into the preemption buffer at +0x2980 instead of +0x1480 (0xd80 plus 0x700 per cluster), UMA PTC (0xa599) 0x6000400020 instead of 0x13200400020, DUPM (0xd411) 0x3c000000140 instead of 0x200000001 (32 N | 96 N << 32 for N = 10 cores per cluster) and 0x1a0e9 = 0 instead of 8. The J516C's own driver also encodes a queue's first command with the saved-state pointers and the 0x12091/0x101d9 words zero; the G15C commands here are all encoded that way, which is how compute work first completed on a J516C. The values were read from 38 compute commands on a J516C and verified by the register-fault analysis of the earlier J516C driver's boots. The T6030 values are unchanged. The render (TA/FS) values for the G15C are not known yet and stay the G15S ones. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
On the T6031 the boot loader describes the four UAT regions as
reserved-memory nodes without no-map (uat-ttbs, uat-pagetables,
uat-handoff, uat-pagetables-l2), so the kernel maps them and /proc/iomem
lists them as System RAM. The T6030 admission requires every region to be
outside System RAM (its regions are boot-loader carveouts) and maps them
write-combined, which refused the T6031 GPU at its first region ("GPU
region 0 (ttbs) ... not admissible", J516C boot t86) and would have
failed the write-combined remap of RAM next.
On the device-tree platform, admit a UAT region that lies entirely in
System RAM as well, and map such a region through the kernel's own
mapping (memremap MEMREMAP_WB) instead of write-combined, in the handoff
window and in the adopted UAT: what the shared driver does for the other
generations' handoff and TTBAT regions, and how the earlier J516C driver
reached the same regions. The firmware segments must still be outside
System RAM. Carveouts keep the write-combined mapping, so the T6030 path
is unchanged.
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
Add t6031-dcp.dtsi with the T6031 internal display: the DCP, its mailbox, the DCP and display DARTs, the display subsystem and its PIODMA stream. It is the T6030 description with the T6031 addresses: the display block sits at 0x3_8400_0000 instead of 0x2_8c00_0000, and every offset inside it is the same. Addresses, interrupts (four-cell AIC) and DART windows are those of the J516C ADT. On T6031 DISP_FE is the child of DISP_CPU, the other way round from T6030, and the DCP's clock gate depends on both, so the DCP and its mailbox are on ps_disp_fe. The boot framebuffer already is, so J516C needs no framebuffer change. The three display power states are marked apple,inherited-on, which the display gate checks. Every node is disabled. The display gate enables them only on a boot with apple_t6031_display.enable=1 and the boot loader's apple,t6031-handoff. The dcp, disp0 and disp0-piodma aliases are the ones the boot loader looks up. clk_disp0 has the T6030 rate: the ADT gives none. The J516C and J514C board files include the file and add their panels, with the J516S and J514S values (same chassis). t6031.dtsi does not include it, because t6034.dtsi includes t6031.dtsi and none of this is known to hold on T6034. Only the two T6031 DTBs change; every other Apple DTB, T6034 included, is byte-identical. Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 37e3424)
The display hold, the DISP|ANS seed and the acknowledgement wait in pmp-display.c were written for the J514S with its addresses in macros: the PTD at 0x3503c0000, the request word at index 280, the display chain in the PMGR block at 0x350700000. The M3 Max (T6031: J516C, J514C) hands its internal display over the same way, but its PMP lives elsewhere. Describe each SoC's PMP in a struct pmp_display_soc and select it by the board: the PMP node the boot-time handoff adds, the device-state table (base, status, request, acknowledgement and request-set offsets, the DISP and ANS bits), the ASC, and the PMGR window with the display power states to hold. The T6031 entry comes from the J516C ADT: PTD at 0x2903c0000 (status +0x10, request index 0x200, acknowledgement index 0x208, request-set +0x11000), internal display device 17 (bit 16) and storage device 34 (bit 33), ASC 0x290c00000, display chain DISP_SYS +0x200, DISP_FE +0x298 and DISP_CPU +0x2a0 in the PMGR block at 0x292280000. A T6031 boot of our earlier kernel showed that request and acknowledgement (0x200010000 requested, acknowledged with bit 16 set). The memory floor and the AGX vote stay T6030-only: the T6031 table's CPU-client entries have not been read, and the T6031 GPU needs no PMP vote. The display functions lose their j514s_ name, since two boards share them; the GPU vote keeps it. apple_pmp_display_retained_board() covers T6031 too, so pmp-core.rs confirms registry updates and keeps the PMP bound on it as well. apple_pmp_display_present() tells the display driver whether the handoff added a PMP at all. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
The T6031 boot loader leaves the internal DCP running with the panel lit and describes that state without enabling anything: the DCP, its mailbox, the two display DARTs and the display subsystem stay disabled, and the DCP, the display subsystem and the PIODMA child carry apple,t6031-handoff = <1> once the inherited DART mappings have been checked and locked. This Mac's PMP values are in /chosen/asahi,t6031-pmp (board and DRAM ids and 72 apple,tunable-* properties on the J516C). Add an arch_initcall that completes this for the display driver, only with apple_t6031_display.enable=1 on the command line: it checks the markers, the 14.7.0 firmware version, the mailbox and DART links, that the display power chain is apple,inherited-on, and this Mac's PMP values (the image must be the T6031 PMP image, 07FF4C5B-...). It then adds the PMP, its DART and its mailbox under /soc with the J516C ADT's addresses and interrupts (SRAM 0x290700000, ASC 0x290c00000, mailbox IRQs 1180-1183, DART 0x290300000 IRQ 1184), copies the boot loader's values onto the PMP node, keeps the pmp and pms_sram power states on, and enables the five display nodes, all in one changeset. If any check fails nothing is changed and the boot framebuffer stays. Without the option it logs the handoff and does nothing. apple_t6031_display.pmp=0 enables the display nodes without a PMP, for a boot that tests whether the adopted DCP needs one. The option DRM_APPLE_DCP_T6031 builds it and the driver's T6031 variant. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
The J514S panel admission held its board in macros: the DCP image, the coprocessor window, the panel size, the boot framebuffer stride and the form of the boot loader's handoff. Put those in a struct dcp_v14_7_board and add the M3 Max entry: J516C and J514C on T6031, DCP image F493F03E-CC40-3D89-9A08-5F259BA2B246 (this Mac's ADT and the boot loader's apple,firmware-uuid), coprocessor window 0x386c00000, the 3456x2234 panel with 74 notch rows above the 3456x2160 boot framebuffer at 13824 bytes per line. The T6031 handoff is marked, not enabled: apple,t6031-handoff = <1> on the DCP, the display subsystem and the PIODMA child, each with its memory regions, and the T6031 display handoff enables the nodes. The admission reads that form next to the J514S one. The preferred-timing check uses the board's panel size from the session instead of the J514S constants. The OS log carveout of the T6031 handoff carries apple,dcp-os-log without the apple,asc-mem compatible, so the reserved region lookup accepts it by that marker. The PMP display hold goes through the renamed pmp-display.c functions. On T6031 the handoff may leave the PMP out (apple_t6031_display.pmp=0); the DCP is then adopted as the boot loader left it, with a warning, so one boot can tell whether the running DCP needs the PMP at all. The T6031 DCP and display subsystem join the match tables under DRM_APPLE_DCP_T6031; the session and presentation paths are the J514S ones. The panel's size and brightness come from the panel child the T6031 device tree carries. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
The macOS 14.8 boot volume's stub loads a different J516C GPU firmware build than the 14.7 chain: TEXT 0x64000, DATA 0x140000, GKTS 0x5cf28, SHA-256 1bf2fd3476befe736bc2c070bad45f8be36b68cd11bcff16c9029d6bcda026cf, first measured through g15_accept_text_prefix. The layout is identical and nothing else in the T6031 configuration is keyed on the build, so it is a second entry in the same table. The prefix escape stays. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
The T6031 board record admitted the J516C only; on a J514C the DCP was refused with "no board record for this machine" and the boot framebuffer stayed. #363 admits the J514C alongside the J516C. Add a J514C record on the T6031 DCP with the J516C image (the image is the SoC's; its UUID is checked at probe). The J514C board file names the J514S panel values (the same chassis), not yet read from a J514C, so the record takes the panel size from the boot framebuffer like the T6030 record does, and logs every panel timing and the display clock on its first boots. Assisted-by: LLM Signed-off-by: Diljit Singh <hey@djdev.me>
|
Great work on the J516C. I have the 14" sibling, a J514C (MacBook Pro 14" M3 Max, T6031, 16 CPU / 40 GPU cores, 64 GB), and I'm happy to test the T6031 row on it. Current state of this Mac
Bring-up report from Questions
|
|
Hey @schneipp I'll fix up the PR so you can run this on your machine. |
…66) tools/m3-accept boots the dev slot through m3-testboot (plain reboot into the default entry, or a one-shot with PARAMs), runs the native checks with the GPU busy time around them and kmscube on the panel with the crtc present counters around it, and writes one record with the verdict on top. tools/accept_verdict.py is the pure parser/verdict (19 host tests): it fails on no READY, a failed/missing check or any wrong word or pixel, a GPU fault/recovery/crash line, engine recoveries, eDP-1 missing or a refused present, records the measured numbers without judging them, and refuses a collection holding MAC addresses or serials. Baseline (results/20261019-170009-baseline-accept): PASS on silicon-10 (aurora-silicon/linux#363 head e30d702) and Mesa aab698d2 (mesa#25, merged). READY 0.08 s; 0 wrong; 59.9 presents/s on the 120 Hz mode (the #62 symptom); GPU busy 78 % during the checks; GPU clock not exposed (#58). research/external-displays.md: #66 decision "later", blocking pieces named. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h ledger The PB growth ledger assumes every block of the heap's address range has RAM behind it. For a heap backed on demand it also has to know how many blocks are backed, grant a request only from those, say when the next chunk of backing is due, and start over at a re-initialization without forgetting the backing. Add `backed` to the ledger, counted in chunks of 128 blocks (16 MiB), and a reserve of one chunk: a chunk is due whenever fewer than 128 backed blocks remain above the posted count, so the chunk is allocated after a reply and the reply path never waits for the allocator. `accept` now returns an answer: a grant clipped to the backed blocks, a refusal at the maximum, or a wait when the reserve ran dry (the request is accepted again once backed; its counter is not consumed). `reinit` returns the posted count to the initial size and keeps the backing; `keep_chunks` gives the chunks the initial posting and the reserve need; `reclaim_due` is the idle test of the re-initialization policy. Core-only, host-tested (12 tests). The heap is still allocated whole here, so the caller starts the ledger fully backed and maps the answer to its grant. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
…mand The PB heap was one 512 MiB GEM object, populated at start, mapped into the firmware window and aliased into every user VM, whatever the machine's rendering needed. The firmware learns a page's address only from the page- and block-list records, so pages behind blocks that were never posted are never touched: the G13/G17 driver of this tree backs each block as its own 128 KiB allocation from the user VM's allocator, and the native driver of this machine maps its 64 initial blocks as 64 separate guarded objects with no page table toward its maximum. On the M3 Max the desktop never left the initial posting, while a full dEQP run peaked at 2884 blocks, so the populated heap was 512 MiB of RAM for 8 MiB to 360 MiB of use. Keep the 4096-block client VA range, but back it in chunks of 128 blocks (16 MiB): each chunk is a GPU-only GEM object mapped at its fixed GVA in the user VMs (at VM creation; into the VMs of the flights when a chunk is backed; into a job's VM at its publication) and not in the firmware window. The ledger grants a request from the backed blocks above the posted count and, after the reply, backs the next chunk whenever fewer than a reserve chunk remain, so the reply path never waits for the allocator; a request that finds no backed block (the reserve ran dry) stays queued and is answered by the next pass. The window mirror of the firmware's page tables forbids freeing kernel-window tables, which is the other reason the chunks live in the user VMs only. At boot the chunks of the initial posting and one reserve chunk are backed. The stats line appends backed blocks, chunks, waits and refills. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
The initial posting was 1024 blocks (128 MiB). The native driver of this
machine starts every PB at 64 blocks (8 MiB): manager +0x28 = 256 pages,
+0x30 = 64, block_ctl {64, 64}, InitBM 64, and renders a 3456x2234 login
screen at 17 frames a second inside them without one growth request.
Growth on this driver is a round trip of 1-2 ms per ten blocks, so a
desktop's first frames after boot pay a few of them once.
Post 64 blocks at (re)initialization by default, settable with
g15_pb_blocks (64..4095). With the heap backed on demand this makes the
PB's RAM at boot two chunks (32 MiB): the posting and the reserve.
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
Blocks posted to the PB never come back while the PB lives: the firmware recycles pages inside its own pool and the records give the host no view of it, so the posted count only grows until a re-initialization. On the M3 Max one dEQP test takes about 1200 blocks past the firmware's maximum each time it runs, whatever is already posted: a 512 MiB heap was exhausted by the second run of one list and the GPU fail-stopped at the refusal. The native driver of this machine reclaims by replacing a live queue's PB manager with a fresh one, old blocks re-posted and old pages unmapped, with no halt. Re-initialize the PB when the engine has had nothing published and nothing pending for g15_pb_idle_ms (1000) with more than g15_pb_reclaim_blocks (1024; a desktop stays below it) posted: the next render prefix takes the re-initialization path of a recovered abort (fresh lists and manager, InitBM of the initial blocks) without a halt, and with g15_pb_reclaim 2 (the default; 1 re-initializes only, 0 never) the backing chunks above those of the initial posting and the reserve are freed at once and unmapped from every open VM; a VM that publishes later drops its stale mappings first. Idle polls are not re-armed, so the check also runs when a job arrives at an idle engine, before its publication. The stats line appends reclaims and freed chunks. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
The idle reclaim needs g15_pb_idle_ms without work. Heavy scenes started back to back (a new client a few hundred ms after the last) never reach it, and posted blocks do not come back while a PB lives: three such scenes of ~1420 blocks ran the heap to its maximum and the fourth hung the GPU into fail-stop. Re-initialize also after 50 ms idle with more than half the maximum posted. 50 ms is longer than the gaps between one client's renders: a re-initialization with no idle time, between two renders of one client, faulted at the heap base. That path keeps the backing, so the next scene does not allocate it again. The idle reclaim now also runs when more chunks are backed than the posted blocks need, so backing kept this way is freed even if the next client posts below g15_pb_reclaim_blocks. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
The producer is the posted count modulo the 4096-record block list, so 4096 posted blocks read as an empty list. Ledger::new() still accepted 4096 as the initial size or the maximum, and took it with growth off. Cap both at 4095 (min(MAX_BLOCKS, BLOCK_LIST_RECORDS - 1)). The current callers (64 initial, 4095 maximum) are unchanged. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
|
@iconidentify Six more commits for the carry, What changes
Tested on the J516C
Like the earlier pool and PB commits, these touch shared G15 code, and they are untested on T6030. Not here yet: a PB per client. It needs per-queue firmware render queues in the engine, which is our next step. |
Feature-by-feature verdicts (in, adapted, missing), the on-demand PB differences, the native G15 UAPI check against Mesa aab698d2, and what a J516C needs to start native G15 on #177. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Commits of t6031/stack-on-177, what each ports from aurora-silicon/linux#363 or changes in #177, per-commit builds and host tests on the M3, the package path, the test plan for the boot, notes for the PR text (boot-loader GPU enable, no-GPU desktop fallback) and open questions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing tells userspace which operating point the firmware runs the GPU at. Add asahi-g15/pstate, read-only, from the two places the firmware reports it: - the stats ring (256 records of 0x40 bytes, a u32 tag at +0): a power-state record (tag 0x0b) has the state index at +0x20, the layout the Asahi driver's StatsMsg::PowerState decodes. The ring was consumed unread; the drain now notes every record's tag and the newest power-state index before it advances the consumer, and the file also notes the records not yet consumed, without consuming them; - HardwareDataA (hardware record +0x4580): the actual, target and current state indices at +0x2c, +0x30 and +0x38, and the frequency in MHz as an IEEE single at +0x58, the Asahi driver's actual_pstate, tgt_pstate, cur_pstate and freq_mhz for firmware 13.0b4 and later. The prefix lines up with this build: the maximum power word at +0x6a4 is that layout's max_power_2, and the T6030 initdata already writes its S8 request at +0x2c and +0x30. The first line is what a sampler reads: pstate <index> freq_khz <kHz|unknown> source <stats|hwdata> from the newest power-state record, or HardwareDataA's current state while the stats ring has carried none. An index counts the firmware's DVFS states, 0 (off) to 8; its frequency is the state's table-A operating point from the device tree (or the T6030 ADT). Further lines give the record counts per tag, all HardwareDataA words with the single in kHz, and the nine table-A frequencies, so that one boot shows which source moves under load. The decoding is in power/pstate.rs, core-only and host-tested (the single to kHz conversion against the host's arithmetic, ties to even, the ring walk with wrap, the file text). Signed-off-by: Naeem Malik <malik2015naeem@gmail.com> (cherry picked from commit 7c26fe1) [SiliconForest: onto asahi-m3; power.rs exports standby() from the idle-standby carry beside the new pstate module. The ring code is unchanged. The stats drain samples the producer and then the consumer index, as before. With both inside the ring it notes each pending record's tag and +0x20 word after a read barrier, rereads the consumer and writes it to the sampled producer under the same compare as before. With either outside the ring it runs the earlier drain. On the T6030 this is the shipped native GPU's drain, and the record reads make it longer. The pstate file only reads. Deferred from PR12; carried at the owner's request.] Source: #363 Upstream-commit: 7c26fe1 Generated-by: LLM [Maintained-driver port: G15 subtree hunks only; asahi-m3 path becomes maintained asahi/g15; tests carried in the dedicated test adaptation.] Source: https://github.com/iconidentify/siliconforest-linux/commit/bec6e4f83afd815b38803e754333b8954ce7bc29 Upstream-commit: bec6e4f83afd815b38803e754333b8954ce7bc29 Generated-by: LLM (cherry picked from commit 7b916b5)
…t need zero Two boots, each with one group of the board file's non-device-tree words left zero, reached READY, passed every check at 120 fps and ran at 1380 MHz under load with no fault: the 27 words in the HardwareDataB +0x38..+0x638 block with the two all-ones words after it (zero in the G15S templates), and the tail's thirteen readings (a single at HardwareDataA +0x6d34, twelve singles after +0x6d80). Drop them from record::FROM_FILE for good: the builder leaves them zero, record::UNNEEDED names them, and the cross-check accepts the file's value there against a zero built word while still comparing everything else. The record now takes 32 words from the file: the maximum power, the six MTR mask words, the seven relative powers and the six sensor rows. The board-data line counts both. A 10 s load cannot show a long-term thermal effect of the thirteen readings; the acceptance run's clock readout is the place that would. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com> (cherry picked from commit 5131caf) [SiliconForest: onto asahi-m3, where blob() runs in prepare_board(), before any GPU firmware is touched, and the record builder keeps its checked arithmetic; the cross-check change applies there. FROM_FILE keeps 32 words: - the maximum power (HardwareDataA +0x6a4); - the six MTR fast-die and alarm mask words; - the seven relative powers (record +0x1060..+0x1078); - the six sensor rows (18 words from HardwareDataA +0x6c58). Measured on one J516C: two boots, each with one group zero (the 29 HardwareDataB-block and all-ones words, then the 13 tail readings). Both reached READY, passed the acceptance checks and ran at 1380 MHz under a 10 s load. Not measured: other J516C units, and sustained or thermal load with the 13 readings zero. The T6030 builds from its templates and is not affected. Held from PR12; carried at the owner's request.] Source: #363 Upstream-commit: 5131caf Generated-by: LLM [Maintained-driver port: G15 subtree hunks only; asahi-m3 path becomes maintained asahi/g15; tests carried in the dedicated test adaptation.] Source: https://github.com/iconidentify/siliconforest-linux/commit/3be092a24989523cab10253243981ab32c92193a Upstream-commit: 3be092a24989523cab10253243981ab32c92193a Generated-by: LLM (cherry picked from commit af6c3b7)
The compute UMA manager's freelist held the pages of the first eight of the 22 compute pools (8192 pages, 32 MiB). On the J516C a compute dispatch runs at most ten workgroups of more than ~576 threads at once and its eleventh never completes (firmware timeout after 500 ms, no fault; ticket malik-na/linux-aurora#69), while any number of smaller groups complete and an eleventh large group from another dispatch waits for one of the ten. Large groups draw their memory from this pool, so the freelist, not a core or cluster count, is what runs out; compute faults are masked, so the exhausted page manager stalls instead of faulting. Seed the freelist with every pool (22528 pages, 88 MiB) and report that count in the manager. The freelist object (4 MiB, 524288 entries) and the pool table already hold all 22 pools. With every pool seeded, dispatches of up to 256 workgroups of 1024 threads complete on the J516C, and the 129 dEQP cases that hung pass. The pool code is shared by every G15 SoC, so T6030 gets the larger seed as well; its limit was not measured. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com> (cherry picked from commit 97f81d5) [SiliconForest: onto asahi-m3, path only. The pool code is shared by every G15 SoC, so the T6030 of the native GPU profile also gets all 22 pools (22528 seeds) in the compute freelist. That limit was not measured on T6030 hardware.] Source: #363 Upstream-commit: 97f81d5 Generated-by: LLM [Maintained-driver port: G15 subtree hunks only; asahi-m3 path becomes maintained asahi/g15; tests carried in the dedicated test adaptation.] Source: https://github.com/iconidentify/siliconforest-linux/commit/d0fc3c53d90f0be24644c0f3d8e3ba46bf9a0e0d Upstream-commit: d0fc3c53d90f0be24644c0f3d8e3ba46bf9a0e0d Generated-by: LLM (cherry picked from commit 96b387c)
…s at the maximum A full dEQP run deadlocked the driver after the parameter buffer had grown to its 2048-block maximum: the firmware kept asking for more, every request was admitted and answered with the refusal, and the reply's wait drained the next request, so the poll pass answered requests forever under the device lock. Every other path then blocked behind that lock: job runs, VM creation, file close, the debugfs stats (ticket malik-na/linux-aurora#69). Answer at most two refusals per PB initialization; from the third request at the maximum on, leave the requests unanswered (one warning) so the firmware's TA stalls and the host deadline takes the existing recovery path. Answer only the requests queued before a poll pass; those drained during a reply's wait go to the next pass, with the lock released in between. The ledger logic and its host test cover the bound. Add g15_pb_max_blocks (default 2048, 64..2048) to reach the maximum early for a repro. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com> (cherry picked from commit a7aa691) [SiliconForest: onto asahi-m3, path only. The next carry changes what g15_pb_max_blocks controls.] Source: #363 Upstream-commit: a7aa691 Generated-by: LLM [Maintained-driver port: G15 subtree hunks only; asahi-m3 path becomes maintained asahi/g15; tests carried in the dedicated test adaptation.] Source: https://github.com/iconidentify/siliconforest-linux/commit/e2a97e967bea7b45c02801fa9afc4ae450be5a40 Upstream-commit: e2a97e967bea7b45c02801fa9afc4ae450be5a40 Generated-by: LLM (cherry picked from commit a525207)
…r partial renders At the parameter buffer's maximum the firmware does not finish the scene with partial renders on its own: a partial render spills the tiles' intermediate state into pages borrowed from the same buffer, so it asks the host for more pages synchronously, and a refused request leaves the TA stalled for good; the fragment kill does not end it and the host deadline fail-stops (ticket malik-na/linux-aurora#69, the full dEQP run). The G13/G17 driver of this tree describes the same mechanism and grows synchronously on every such request, with maxima of 800 MiB and more. Give the firmware a growth maximum below the mapped 2048-block heap (g15_pb_max_blocks, now 1536 by default, at least the initial size) so its asynchronous growth stops there, and answer every request from the blocks above it up to the heap; the two-refusal bound stays as the backstop at the heap's end. The stats line shows both maxima; the first answer past the firmware's maximum is logged. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com> (cherry picked from commit b4a6b32) [SiliconForest: onto asahi-m3, path only. From here on, g15_pb_max_blocks sets only the growth maximum written to the PB manager. The ledger runs to the mapped heap, and the parameter does not change how much memory is allocated.] Source: #363 Upstream-commit: b4a6b32 Generated-by: LLM [Maintained-driver port: G15 subtree hunks only; asahi-m3 path becomes maintained asahi/g15; tests carried in the dedicated test adaptation.] Source: https://github.com/iconidentify/siliconforest-linux/commit/1a16318bc89c0658152405a3f587436b06c15157 Upstream-commit: 1a16318bc89c0658152405a3f587436b06c15157 Generated-by: LLM (cherry picked from commit dec88ab)
A full dEQP run still ended a scene at the 2048-block maximum: one context went from 1544 to 2048 blocks in 0.34 s, ten blocks a request, and was refused there (ticket malik-na/linux-aurora#69). The G13/G17 driver of this tree lets a buffer grow to about 822 MiB, a third of that without memoryless targets, and never refuses below it. The PB is one heap for every context here, so two clients share the budget. Map 512 MiB (4096 blocks of 128 KiB, 16384 pages; the block list of 4096 records and the page list of 40960 records already hold them) at the same client VA, moving the block list up to 0x70f0000000, post at most 4095 blocks (the producer never returns to 0), start at 1024 and give the firmware a maximum of 3072 by default, leaving 1023 blocks (102 requests) for partial renders. Every growth answer past the firmware's maximum is logged with its tiler position, so a runaway (the same position request after request) can be told from a large scene. Memory: the heap is populated at start, so 512 MiB of RAM instead of 256 MiB. With this heap the same full dEQP run peaks at 2884 blocks, with no refusal and no growth past the firmware's maximum. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com> (cherry picked from commit 027bd76) [SiliconForest: onto asahi-m3. The hw.rs hunks apply at SiliconForest offsets, below the J516S firmware entry, and are otherwise unchanged. The PB heap is shared by every G15 SoC, so the T6030 of the native GPU profile also allocates the 512 MiB heap when the GPU starts, 256 MiB more than before. g15_pb_max_blocks does not reduce that. ClusterLayout derives Q from PB_HEAP_SIZE, so Q goes from 2 to 3 and the clustered tiling buffer's M4 area grows from 3 x 512 to 4 x 512 bytes, moving M1. Not run on T6030 hardware here.] Source: #363 Upstream-commit: 027bd76 Generated-by: LLM [Maintained-driver port: G15 subtree hunks only; asahi-m3 path becomes maintained asahi/g15; tests carried in the dedicated test adaptation.] Source: https://github.com/iconidentify/siliconforest-linux/commit/dba2a110de00743eeecd41edf23e54ede4491d5e Upstream-commit: dba2a110de00743eeecd41edf23e54ede4491d5e Generated-by: LLM (cherry picked from commit 07aae94)
The T6031 board record admitted the J516C only; on a J514C the DCP was refused with "no board record for this machine" and the boot framebuffer stayed. #363 admits the J514C alongside the J516C. Add a J514C record on the T6031 DCP with the J516C image (the image is the SoC's; its UUID is checked at probe). The J514C board file names the J514S panel values (the same chassis), not yet read from a J514C, so the record takes the panel size from the boot framebuffer like the T6030 record does, and logs every panel timing and the display clock on its first boots. Assisted-by: LLM Signed-off-by: Diljit Singh <hey@djdev.me> (cherry picked from commit 1cd6efc) (cherry picked from commit c5399c56d2f6689f586b8a9a3b4dcbc8045ad870) (cherry picked from commit e25291b)
|
Hey @schneipp, M3 Max GPU support got merged to omacom/linux-aurora repository. omacom/linux-aurora#182 Could you please test it from the latest build on you 14" Max? |
|
@malik-na Thanks for the invitation to test! I am ready to test the 14-inch J514C (T6031, 16 CPU / 40 GPU cores, 64 GB), but I could not identify the intended GPU-enabled build. I checked the
Could you point me at the exact kernel package or build recipe/config you want tested, the matching m1n1 and Mesa, and how to obtain/build the J514C board data (or confirm an alternative path)? Is the initial request a display-only boot test, or should GPU startup be possible on J514C now? My machine still uses GRUB and stock m1n1 1.6.1, with OS firmware 14.7 / iBoot |
RyanTheTide
left a comment
There was a problem hiding this comment.
I rechecked e272b67. The J516C desktop, suspend and demand-backed PB results are useful, and the newer PB work avoids the old fixed 512 MiB allocation at startup.
The remaining blockers are still there. drivers/gpu/drm/asahi/g15/hw/t6031.rs:120 and drivers/gpu/drm/asahi/g15/hw/t6031.rs:176 require an off-tree, board-specific file for words missing from the loader handoff. We need a documented loader contract and a reproducible, licensed way to supply those values. The three image-comparison failures reported in the PR also need fixes and fresh results. The shared allocation and reclaim changes in drivers/gpu/drm/asahi/g15/pools.rs:21 still need T6030 coverage.
Please carry the residual T6031 work onto #395 rather than bringing the old #358 stack across again. With the board-data dependency and render failures resolved, run both universal WERROR recipes, KUnit, DCP host tests and DT checks on that tree, then J516C, T6030 and Neo regression checks. Keep the stated J516C scope clear until J514C has its own qualified data and display profile.
|
@schneipp Thanks for the careful check. Your reading is right, and I'll answer your questions in order. What a J514C can test today: display only, not GPU.
The capture is the useful part. Tracing your J514C under the m1n1 hypervisor and reading the DCP and PMP UUIDs from the ADT is exactly what unblocks a J514C profile and a Invitation: join the Mac Lab as a volunteer. We run a test lab for Omarchy on Apple Silicon Macs (https://github.com/chriskearney/maclab). A volunteer Mac is enrolled once; after that, test kernels and scripts run on it only inside an availability window you set yourself, on AC power, and you can pause or close it any time ( |
|
@malik-na Thanks for the guidance. I've completed the M3 report capture on my J514C. Hardware:
System:
M3 Report:
Note: SMC keys are missing from the report (debugfs not mounted or SMC driver didn't start). The report was generated with the I have the report file ready and both Macs (M3 Max with macOS + M2 proxy host) available for the m1n1 hypervisor capture when you're ready to send the tracer and steps. |
|
@malik-na @schneipp Follow-up from this J514C (14-inch M3 Max, T6031). I ran a current Machine / build
Report
The hypervisor InitData / |
|
Sudo
|
RyanTheTide
left a comment
There was a problem hiding this comment.
The base branch j514s/m3-pro-20261017 belongs to #358, which is closed, so this can't merge as it stands. Please rebase onto integration/aurora and retarget the PR there. A test merge into the current integration/aurora conflicts across many files, mostly in drivers/gpu/drm/asahi and drivers/gpu/drm/apple.
|
Thanks for the M3 Max bring-up, and for the detailed test notes. Before this can go further, a few parts conflict with how we structure machine support. We select behaviour by a hardware property, not by a list of machines it was tested on, and a machine has to work without kernel command-line switches or its own kernel config:
Happy to run rows on our M1 Pro / M2 / M4 Pro / A18 Pro for anything that becomes shared. |
|
@malik-na Following up from the J514C (14-inch M3 Max, T6031). Two things I can help with:
My latest sudo |
Adds the M3 Max (T6031, G15C, 4 clusters x 10 cores) to the G15 Rust driver from #358, as a second
Configrow next toT6030. The T6030 path is unchanged.
Stacked on #358.
Commits
arm64: dts: apple: t6031: describe the GPU, disabled: the T6031 GPU node (cherry-picked from Chris's tree).soc: apple: mailbox: match the T6031 GPU mailbox without the v4 fallback.drm/asahi: g15: Add the T6031 (M3 Max, G15C) configuration row:apple,agx-t6031, the G15C ID and core counts,a 40-bit core mask (four per-cluster masks in GET_PARAMS), and the GPU regions, segments and operating points read from
the device-tree node. No PMP vote: on the J516C the GPU powers up through its power domain alone.
drm/asahi: g15: Pin the J516C GPU firmware build: TEXT 0x64000, DATA 0x140000, plusasahi.g15_accept_text_prefix=to admit a different build for testing.drm/asahi: g15: Build the J516C initdata from its board images: the J516C layout (root version0x0c08e21e84820490, the 0xb480-byte hardware record, a 17-slot IO table), with the board images loaded from a
sha-pinned firmware file,
asahi/t6031-j516c-board.bin.drm/asahi: g15: Encode compute commands with the G15C register values.drm/asahi: g15: Admit and map UAT regions that are reserved System RAM: on the J516C device tree the UAT regionsare reserved memory inside System RAM rather than carveouts, so they are mapped write-back. Carveouts keep the
write-combined path.
Display (internal panel)
arm64: dts: apple: t6031: describe the internal display, disabled: the T6031 DCP nodes and the J516C panel (cherry-picked from Chris's tree).soc: apple: pmp: hold the T6031 display through its own PMP table: the J514S constants become a per-SoC table, with a T6031 entry. The AGX vote and the memory floor stay T6030-only.soc: apple: t6031: take the internal display handoff and add the PMP: withapple_t6031_display.enable=1, this adopts the display that m1n1 hands off. It adds the PMP and its DART and mailbox from/chosen, and enables the DCP and display-subsystem nodes.apple_t6031_display.pmp=0skips the PMP.drm/apple: adopt the T6031 (J516C) panel session: a T6031 row on the v14.7 DCP path: the J516C DCP firmware, 3456x2234 panel, and a marker-form handoff. The PMP hooks are skipped when there is no PMP node.Tested on the J516C with
apple_t6031_display.enable=1:apple-drmdrives eDP-1 at 3456x2234@120, replacing simpledrm;kmscube -Aruns 1200 frames at 60 fps from a GPU buffer imported into apple-drm through kmsro, with 0 refused presents.Follow-ups (2026-10-19)
On top of the commits above (details in the PR comment of 2026-10-19):
asahi-g15/pstateshows the current GPU operating point in debugfs;Current state on J516C (M3 Max 16", 40 cores)
Tested with aurora-silicon/mesa
aurora-wip(the G15C admission from aurora-silicon/mesa#25).Working:
apple-panel-bl.dEQP subset (VK-GL-CTS 1.4.7.0, 2 jobs, nothing excluded):
Nothing is excluded from these counts. There is no fail-stop and no recovery. GLES3 also has a few flaky depth_stencil/blend cases that pass on retry.
Known gaps
asahi/t6031-j516c-board.binis not in this PR and is still required for 32 hardware-record words the device tree does not carry: maximum power, relative powers, MTR masks and the sensor rows. The sensor rows need a boot-loader export ofaon-ptd. The file is also the cross-check for everything built from the device tree.asahi.g15_accept_text_prefix=remains for testing others.