Repository navigation
drm/asahi: g17: log the MMU fault banks on recovery - #1075
Merged
RyanTheTide merged 1 commit intoNov 7, 2026
Merged
RyanTheTide merged 1 commit into
RyanTheTide merged 1 commit into
Conversation
A G17 recovery reports the firmware's reason (3 is a page fault) and the blamed queue, but not which address faulted or which unit faulted on it: the G17 runtime never reads the MMU fault registers. On T6040 a Transport Fever 3 shadow pass page-faults its fragment queue repeatably, and without the address there is no telling whether a depth surface, a tiler heap page or freed client memory is behind it. T6040's GPU is G16S hardware, and G15/G16 expose the fault through two banks: status at SGX +0xd8c0 and address (64-byte units) at +0xd8c8 under the bank selector at +0xd800 (g16::regs::Regs::engine_state). Read both banks while the firmware is halted in the recovery handshake, restoring the selector, and log them decoded by the existing G14X decoder, now shared as regs::decode_fault(). This is diagnostics only: nothing in attribution, cancellation or release depends on it. Signed-off-by: Jonathan Goyvaerts <[email protected]> Assisted-by: LLM
RyanTheTide
approved these changes
Nov 7, 2026
RyanTheTide
left a comment
Contributor
There was a problem hiding this comment.
Merge-train review (MTR-J, 11-07): approved, merging.
- Review:
fault_banks()reads and restores the bank selector with the same 64-bit accesses asg16::regs::Regs::engine_state(): SGX +0xd800/+0xd8c0/+0xd8c8, i.e. the g16 status window at +0x1800.decode_fault()is a pure move. The newfault_info & 1 == 0early return matches what the resource method already did.- It is only called from
recovery::servicewhile the firmware is halted. Failures only log. - G15, G16 and the G18 boot path read the same D8C0 bank, so the G17P (Neo) read is the same layout.
- Gates (integration
b8ae494f+ linux PRs 1073-1076 merged locally):- buildbox fleet-recipe build: 0 new warnings;
- run-host-tests 193/193, apple-dcp 86/86;
- J616s one-shot: err 0, 0 AVC, 0 failed units, GPU/vkcube/glmark/camera OK, dEQP-VK L1 slice identical to fleet19;
- Neo (G17P): one-shot of the same kernel vs the fleet20 default; the GPU code is the same as fleet19. Both boots: CTXR window enforcing, execmem-confine 1696/0, os_uuid pin, err 0, 0 AVC, 0 failed units, vkcube/glmark equal. dEQP-VK L1 stride slice (33,463 cases) and the sync/compute slice (1,350 cases) gave identical results, 0 GPU errors. gpubench, thermally paired (3 runs each from <=66 C): compute.heavy and render.heavy within 0.2%, compute.light 3% faster at depth 16/64.
- No recovery happened on either test boot, so the new log lines were not exercised here. Your J616s examples in the description cover that.
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.
A G17 recovery reports the firmware's reason (3 is a page fault) and the blamed queue, but not which address faulted or which unit faulted on it. The G17 runtime never reads the MMU fault registers.
T6040's GPU is G16S hardware. Like G15 and G16, it exposes the fault through two banks: status at SGX +0xd8c0 and address (in 64-byte units) at +0xd8c8, under the bank selector at +0xd800 (
g16::regs::Regs::engine_state). This commit reads both banks while the firmware is halted in the recovery handshake and restores the selector afterwards. It logs them through the existing G14X decoder, now shared asregs::decode_fault(). This is diagnostics only: nothing in attribution, cancellation or release depends on it.Testing (J616s, M4 Pro)
bank 0: address 0x5bfe250900 write ReadOnly unit CMP(2) ... vm_slot 13. That matches the test's own VM and buffer.bank 1: address 0x10d03021f00 read Unmapped unit gCDM_ID (0xd1) level 1 vm_slot 22, with bank 0no fault (status 0x0).read NoAccess unit gVDM_SSD_SP(0)in bank 0, and anUnmappedlevel-1 miss in bank 1.57222e0ee261, which contains integration/aurora. This branch is a clean cherry-pick onto integration/aurora068dfce19780.🤖 Generated with Claude Code