Repository navigation
drm/asahi: g17: size clustering metadata for four clusters - #1
Closed
AxxzyWasTaken wants to merge 30 commits into
Closed
AxxzyWasTaken wants to merge 30 commits into
AxxzyWasTaken wants to merge 30 commits into
Conversation
Reuse the existing SoC and PMGR descriptions as the shared T604x base. The J616s compiled tree keeps every node and property unchanged. Assisted-by: LLM
Describe the Max CPU, OPP and register-window differences on the shared base. Preserve the qualified J616c node and property values. Assisted-by: LLM Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Move identical register-window constructors into a family helper. The T6040 and T6041 initialization-data checks retain their exact values. Assisted-by: LLM
Select a static 25F84 profile and admit the normalized loaded image measured in three qualification boots. Remove exploratory overrides and unknown-image admission from the support path. Assisted-by: LLM Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Keep the reason-0 and cancellation handling scoped to 25F84, with serial rendering explicitly opt-in. Concurrent-render firmware restarts and complete recovery remain unresolved. Assisted-by: LLM
Add gated 26.5.2 firmware acceptance and headerless powerlog parsing for the T6041 display controller. Assisted-by: LLM
Wait for the flip notification before completing commit cleanup so framebuffer ownership follows scanout completion. Assisted-by: LLM
Give bootarg access width its own hardware setting and patch through one aligned buffer. Preserve surrounding bytes and verify changed words. Synthetic MMIO checks cover malformed tables, bounds and failed readback. Assisted-by: LLM
Describe the six amplifiers and headphone jack in the J616c board DT. Stop playback when the protection lease is lost. Assisted-by: LLM
Limit admission to the qualified J616c machine and firmware layout. Apply the capability per device without allocating or changing the shared variant descriptor. Assisted-by: LLM
Register the watchdog against its platform device and apply the configured nowayout policy. Assisted-by: LLM
Build the production initialization objects with their soft-float types and compare constants with explicit capture inputs. Keep T6040 per-chip calibration validation separate; include no captures or local defaults. Assisted-by: LLM
m1n1 compares DT CPUs with its physical MPIDR enumeration. Appending the Max cores to the Pro topology put CPU 9 out of order and stopped boot before kernel entry. Define the full family topology in hardware order and remove the extra cores from J616s. Check the compiled DTB order for both SoCs. Assisted-by: LLM
The 25G83 tiler parameter block gives clustering metadata 2-4 and 1 fixed sizes (0xc00, 0xa00, 0x600, 0x80) that come from the two-cluster M4 Pro. On the four-cluster M4 Max, clustered tiling outgrows them on heavy geometry: the firmware never starts the render (TA and 3D start stamps stay 0) and kills it as no-progress (recovery reason 0). On GPUs with more than two clusters, size them as the M2 Pro/Max path does (hw/t602x.rs): metadata 2 0xc00, metadata 3 0x2800, metadata 4 0x800, and metadata 1 at 0x44 per block of tiles. The M4 Pro keeps its sizes. Tested on J616C (T6041, 32-core GPU) with an apitrace replay of Minecraft's first in-world frame, which hung 6 of 9 runs clustered before and 0 of 36 after; synthetic heavy geometry ran 0 hangs either way and tiles 3.9x faster clustered than with clustering disabled.
Reuse the existing SoC and PMGR descriptions as the shared T604x base. Keep the M4 Pro DRAM class in t6040.dtsi on top of it. The J614s and J616s compiled trees keep every node and property unchanged. Assisted-by: LLM
astaff
force-pushed
the
t6041/j616c-gpu-audio-video-20261027
branch
from
November 3, 2026 20:33
c048e0e to
3d0938d
Compare
Describe the Max CPU, OPP and register-window differences on the shared base. Preserve the qualified J616c node and property values. Assisted-by: LLM
Move identical register-window constructors into a family helper. The T6040 and T6041 initialization-data checks retain their exact values. Assisted-by: LLM
Select a static 25F84 profile and admit the normalized loaded image measured in three qualification boots. Remove exploratory overrides and unknown-image admission from the support path. Assisted-by: LLM
Keep the reason-0 and cancellation handling scoped to 25F84, with serial rendering explicitly opt-in. Concurrent-render firmware restarts and complete recovery remain unresolved. Assisted-by: LLM
Add gated 26.5.2 firmware acceptance and headerless powerlog parsing for the T6041 display controller. Assisted-by: LLM
Wait for the flip notification before completing commit cleanup so framebuffer ownership follows scanout completion. Assisted-by: LLM
Give bootarg access width its own hardware setting and patch through one aligned buffer. Preserve surrounding bytes and verify changed words. Synthetic MMIO checks cover malformed tables, bounds and failed readback. Assisted-by: LLM
Describe the six amplifiers and headphone jack in the J616c board DT. Stop playback when the protection lease is lost. Assisted-by: LLM
Limit admission to the qualified J616c machine and firmware layout. The qualified image carries no CODECS trailer, which otherwise keeps T6040 HEVC hidden. Apply the capability per device without allocating or changing the shared variant descriptor. Assisted-by: LLM
Register the watchdog against its platform device and apply the configured nowayout policy. Assisted-by: LLM
Build the production initialization objects with their soft-float types and compare constants with explicit capture inputs. Keep T6040 per-chip calibration validation separate; include no captures or local defaults. Assisted-by: LLM
m1n1 compares DT CPUs with its physical MPIDR enumeration. Appending the Max cores to the Pro topology put CPU 9 out of order and stopped boot before kernel entry. Define the full family topology in hardware order and remove the extra cores from T6040. Check the compiled DTB order for both SoCs. Assisted-by: LLM
Keep the shared firmware profiles' tiler segment control (0x1c890, 0x1c918) and enable mode 1 (0x1c890 = 1, 0x1c918 = 0) only in T6041's admitted 25F84 build. Pass that device/build policy through RenderArgs without changing register ordering, merge-buffer writes, fragment programs or serial-render admission. Add KUnit coverage for the policy boundary and constructor output, including SCS array shape and unchanged fragment/G17P arrays. Motivated by AxxzyWasTaken's separate J616C/25G83 implementation results: aurora-silicon#525 (comment) Those results do not validate this branch or its 25F84 firmware; the cluster merge-buffer explanation remains a hypothesis. Validation: patch application/reversal, whitespace and source-scope checks. Not yet compiled, KUnit-executed or hardware-tested. Keep the existing asahi.t6041_serial_render=1 workaround pending the concurrent-render test matrix documented in the PR. Assisted-by: LLM
astaff
force-pushed
the
t6041/j616c-gpu-audio-video-20261027
branch
from
November 4, 2026 00:40
3d0938d to
84612a4
Compare
…r-tiling The branch's other commits are an old copy of the base, so the tree takes the base as it is, plus the four-cluster sizes. Metadata 4 now keeps the base's larger partial-render size where that exceeds 0x800.
astaff
force-pushed
the
t6041/j616c-gpu-audio-video-20261027
branch
from
November 5, 2026 02:49
84612a4 to
18ca0a6
Compare
…r-tiling The tree is the base plus the tiling change of this branch. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
Author
|
Superseded by aurora-silicon#2021, which carries this metadata sizing together with the four-cluster segment words and a larger tiler heap normal maximum, against current integration/aurora. |
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.
On T6041 (M4 Max) some heavy renders never start: their TA and 3D start stamps stay 0, and the firmware kills the render as no-progress (recovery reason 0). This may be the same reason-0 behaviour that aurora-silicon#525 works around with
t6041_serial_render=1.Cause
The 25G83 tiler parameter block in
g17/buffer/target.rsgives clustering metadata 1-4 fixed sizes:0x80,0xc00,0xa00,0x600. Those are the two-cluster M4 Pro's. The four-cluster M4 Max outgrows them on heavy geometry. The driver's own M2 Pro/Max path (hw/t602x.rs) sizes the same buffers larger:0x1c9480x1c8880x16c41/0x1ca400x1c920Change
On GPUs with more than two clusters, use the t602x sizes. Metadata 1 is sized per target from the block count the M1/M2 path uses (
ceil(align(tiles_x, 2) × align(tiles_y, 4) × utiles / 0x1980)), with a floor of the old0x80. The M4 Pro (two clusters) keeps its current sizes. No registers change.Testing
J616C (T6041, 32-core GPU), 25G83 GPU firmware. Kernel 7.2.10 with our G17 tree (which has the same tiler code as this branch), Mesa HoneyKrisp/asahi with
ASAHI_MESA_DEBUG=1queue,nocompress. Not tried on a 40-core part or on 25F84 firmware.0x1c890 = 0x180340,0x1c918 = 4,0x1c9a8 = 0x1c). On top of the sizes they made no difference, so this change leaves registers alone.0x1c890bit 0 set): 2M small triangles took 22.2 ms → 5.8 ms per frame.t6041_serial_rendergo away. That needs a concurrent-render run on this branch.