Repository navigation
drm/asahi: g17: map the fragment status page and parameter-buffer graph firmware-only - #3245
DjDeveloperr wants to merge 1 commit into
Conversation
…ph firmware-only Two more kernel objects in the upper half every execution context includes still gave the GPU write access: - the G17P fragment status page of each render generation. The firmware reads the status there; the GPU writes it through the client alias that register 0x14080 names. - the parameter-buffer graph of each render pair, on G17P and M5. The firmware takes its state, scene and trailer addresses from the descriptors; the GPU reaches its page list through the client alias. GPU work from any client could rewrite another client's render status or parameter-buffer state through them. Map them firmware-only. The client aliases keep their access. M5's fragment status page is already firmware-only. Signed-off-by: DjDeveloperr <hey@djdev.me>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
Superseded 12-01: not a hold under the merge bar (no shown failure). Only metadata checked; follow-ups: rerun cancelled Apple build/KUnit, J700/J714s render rows
Verdict: HOLD at f04367d7
Blockers:
Apple build and KUnitCI was cancelled atf04367d7. Re-runApple build and KUnitso full CI passes at head (Host tests,pr-text, andpr-readinesspassed).- Missing exact-head hardware rows. No hardware rows have been posted yet; per the PR's
Not yetsection, J700 (G17P, includingfault_control=0hard-fault check + CTS draw/renderpass) and J714s (M5) shared-path render rows are required before merge.
Checked:
- Metadata and diff summary (
+10/-3, 3 files),MERGEABLEagainstmain.
Evidence
Apple build and KUnitcompleted ascancelledatf04367d7, and zero hardware rows are posted yet.
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: MERGE at f04367d79322 once the cancelled CI has rerun green and the J700 and J714s rows below pass at this head.
Blockers: none in the code.
Checked: only the kernel's mapping in the shared upper half changes, and the GPU keeps its access through the client aliases. For the fragment status page that is compact_alias(..., PROT_GPU_SHARED_RW) in g17/queue/render/memory.rs; for the graph it is the page-list alias in g17/buffer.rs. The graph's other addresses (state_va(), scene_va(), trailer_va()) go only into firmware command records (fw/render.rs, fw/m5/render.rs) and the queue configuration. Main already maps the scheduler page firmware-only in the same way. Main still maps both objects GPU-writable, so this isn't superseded. It merges with current main 1262f9e1 without conflicts. The KUnit and host-tests runs at this head were cancelled, so I ran the full host-test suite on that merge in the CI's Ubuntu 24.04 image: 998/998 pass, including neo-auxiliary-tests, whose stand-in now requires the firmware-only mapping, and the asahi-m4 selftests. apple-build passed at this head. No Apple material, no gates.
Rows still owed at this head: J700 (G17P), CTS draw and renderpass vs base with hard faults on, so that a GPU access the firmware-only mapping refuses shows up as a fault, with 0 GPU faults. J714s (G17S), a render smoke as the second generation (the graph change reaches M5 too).
Evidence
git merge-tree --write-treeof this head with main1262f9e1(merge base7be48f37) has no conflicts and gives treef35a0dac. Main touchesg17/buffer.rsandmemory.rsin other places, and both allocations are stillPROT_GPU_FW_SHARED_RWon main.tools/asahi/run-host-tests.py --jobs 20on that tree, rustc 1.96.0, Python 3.14.10, no network: 998/998 passed in 330 s.
DjDeveloperr
left a comment
There was a problem hiding this comment.
The fragment status page and parameter-buffer graph now use firmware-only kernel mappings. GPU commands still reach their explicit client aliases, and the Neo auxiliary fixture checks the altered mapping. The ARM64 W=1 Asahi build linked and the Neo auxiliary suite passed all three runs. The J700 render CTS kit is already queued, followed by the J714s control. A non-author approval is still due.
|
J700 (T8140, G17P) PASS on Linux #3245 at Matched all 111,162 Returned to verified Fedora stock |
What: Map two more render objects firmware-only in the kernel's upper half, which every execution context includes:
Until now GPU work from any client could rewrite another client's render status or parameter-buffer state through these mappings. The client aliases keep their access. This follows the review of #3225, and M5's fragment status page is already firmware-only.
Tested: Built at
f04367d79322(asahi profile, GPU module). Host tests: G17 220/220, Neo 14/14 (the auxiliary test now requires the fragment status page's kernel mapping to be firmware-only), M5 97/97, T6040/T6041.f04367d79322f6cf301d1984932a9a94c96782a8on baseline6985e45ab583. Both arms used the same Image and configuration, with onlyaurora.kochanged. All 111,162 draw and renderpass CTS statuses matched withaurora.fault_control=0, zero GPU faults and verified stock recovery. J700 receiptRisk: Two-way · G17P (A18 Pro, M4 Pro/Max) and M5 render paths; shared drm/asahi G17 code.
Not yet
c95c5914f207merges cleanly and preserves the two-file patch ID017b0b393cafefc141b781eb41d68e11b492dbf2. Main has changedg17/queue/render/memory.rssince the tested J700 baseline. Refresh the J700 control on the merge candidate before carrying that result to current main.