Repository navigation
Conversation
T6050 (M5 Ultra) has the T8140 memory cache controller's per-plane allocation and flush controls, with eight AMCCs of four planes on each die: 64 planes on two dies. Add apple,t6050-mcc and allow up to 64 reg entries. Signed-off-by: Jeff Queisser <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
The boot loader leaves the T6050's system level cache enabled and powered but not allocating. On the M5 Ultra (J775D) all 64 planes (eight AMCCs of four planes on each die) read twelve ways enabled and twelve powered (0x2800 = 0x8000000c, 0x2804 = 0x0c000c00), the flush engine idle, and the allocation-disable word (0x82c) at 1. The cache holds no data, so everything that misses an agent's own caches goes to DRAM. The GPU's scratch-heavy fragment passes slowed with the number of tiles in flight, and the GPU firmware's own scheduling pass took 650 us instead of 390. apple-mcc already lets the cache allocate on T8140 and T6040 through the same per-plane words. T6050 uses the same sequence and the same fields (check each plane's ways and flush engine, clear 0x82c and read it back; on shutdown or removal set it, flush and wait), with two changes: - up to 64 planes, not 16 (MCC_MAX_PLANES and the binding's reg maxItems); - a boot-DMA device whose node is not enabled is skipped (the "apple,t6050-mcc" match data): it never binds, so the cache would otherwise wait for it forever. J775D's display node is enabled only when the boot loader hands the display over. The system level cache sits in front of DRAM in the memory controllers. Allocation changes where lines live, not which accesses see them, and the driver flushes it before it stops allocating. Only a device tree with "apple,t6050-mcc" binds the new entry. T8140, T8132 and T6040 keep their plane counts and their boot-DMA wait as it was: T6040's display and T8132's PMP are also enabled by the boot loader, but the skip was tested only on T6050. Testing: on J775D, "system level cache allocation enabled on 64 planes" at 0.71 s and 0x82c reads 0 on all 64. A scratch-heavy 512x512 render in 2x2 passes took 51.5-55.8 ms per submit (202-273 ms without), and the GPU's Vulkan clients, its fault recovery and the desktop ran as before. Signed-off-by: Jeff Queisser <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
Closing: this change now lives in the funkzy/j775d branch of aurora-silicon/linux-aurora (the J775D series as built and booted, 681521644671), which dj merges directly; no PR flow for it any more. |
satchlj
added a commit
that referenced
this pull request
Nov 21, 2026
The T6050 memory cache controller has up to 64 planes: eight AMCCs of four planes per die, on up to two dies. The binding already describes this layout, but apple-mcc has no match for the controller. The boot loader leaves the ways enabled and powered with allocation disabled, so a miss in an agent's own caches goes to DRAM. T6050 uses the T8140 sequence: check each plane's ways and flush engine, clear the allocation-disable word and read it back. On shutdown, removal or deep sleep, disable allocation and flush. Add the match and raise MCC_MAX_PLANES to the binding's limit of 64. Wait for a driver to take over every client the DT lists in apple,boot-dma-devices. A disabled display node can still be scanning out the boot framebuffer, so its status cannot establish that it is safe to enable allocation. The loader must drop a client from the list only once it knows that client's boot DMA is quiescent. Based on #896 by Jeff Queisser, which measured the effect on J775D. Signed-off-by: Satya Benson <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The boot loader leaves the T6050's system level cache enabled and powered but not allocating: on the M5 Ultra
(J775D) all 64 planes read twelve ways enabled and twelve powered (
0x2800= 0x8000000c,0x2804= 0x0c000c00),the flush engine idle and the allocation-disable word at 1. The cache holds nothing, so every miss in an agent's own caches goes to DRAM. apple-mcc already lets the
cache allocate on T8140 and T6040 through the same per-plane words; this adds T6050.
What it changes
apple,t6050-mcc, with up to 64regentries (eight AMCCs of four planes on each of two dies).MCC_MAX_PLANES16 to 64.MCC_CACHE_WAYS_ENABLED, five bits): the raw words above read twelve in it.would wait for it forever. J775D's display node is enabled only when the boot loader hands the display over.
The sequence is the T8140 one: check each plane's ways and flush engine, clear the allocation-disable word and read
it back; on shutdown or removal set it, flush and wait.
Why
Allocation changes where lines live, not which accesses see them, and the driver flushes before it stops
allocating. With the cache allocating, a scratch-heavy 512x512 render in 2x2 passes takes 51.5-55.8 ms per submit
instead of 202-273 ms, and the GPU firmware's scheduling pass 390 us instead of 650.
What else sees it
Only a device tree with
apple,t6050-mccbinds the new entry. T8140, T8132 and T6040 keep their plane counts andtheir boot-DMA wait as it was. T6040's boot-DMA device (the display) and T8132's (the PMP) are also enabled by the
boot loader, so the same skip could apply there; it is left to T6050, where it was tested. No drm/asahi code
changes.
Testing (J775D, M5 Ultra)
The kernel: our J775D series (integration/aurora's lineage, as on the Studio every day) with this PR's code and
that of the other T6050 PRs sent with it in place of the series' own forms, booted once on 2026-11-03 and restarted
at the end. (The first form, with a seven-bit way field, is in the series kernel the machine boots by default.)
(its node enabled, its DCP bound).
cleanly at the end (the driver stops allocating and flushes at shutdown).
same 64 planes.
Not tested
Dependencies
None in git. The J775D DT node (a bus over both dies' AMCC ranges, the display as the boot-DMA device) comes with
the J775D board.
ewb: if J716c boots without SPTM one day, its cache should need only its own node and plane count here.