Repository navigation
drm/asahi: g17: admit A18 Pro mesh renders one client at a time - #2071
Conversation
On the A18 Pro (26A428 firmware), when two clients' renders with mesh shading run on the GPU at the same time, one of them loses part of its mesh output. Either whole mesh workgroups are not drawn, or one view's primitives are shaded with another view's per-primitive data (the view-1-in-layer-0 shape of the prim_query multiview CTS intermittent). The same renders are correct when they run one after the other, and a single client never shows it. In a stress of two processes, each running a draw of 32,768 mesh workgroups over a two-view target (fresh processes beside 3-iteration victims), about 5% of the processes are wrong (81 of 1,558). In a trace of that stress, 32-46% of the GPU jobs overlap another context's jobs on the GPU timeline. With mesh renders admitted one client at a time, the overlap is 0% and the processes are correct: 0 failing of 1,893. The failure does not depend on the tiler heap: it shows with the heap pre-sized and no grow requests at all. The same firmware already needs ray-traversal commands run for one client at a time (g17/traversal.rs). Admit renders with mesh shading (DRM_ASAHI_RENDER_MESH_OUTPUT, or an M5 render with a mesh program; the rule applies to the A18 Pro only) the same way: they run for one client at a time, and other clients' compute commands wait for them as they do for ray-traversal commands. Renders without mesh shading never wait, so a compositor's rendering is not held. A mesh render is no longer published from the submit ioctl. Cost: two clients' mesh renders no longer overlap, so in the stress above each victim process takes 150 ms instead of 93 ms. A single client's mesh rendering is unchanged (cold tgvis 223.2 vs 225.9 ms mean, within the run-to-run spread). aurora.g17_mesh_exclusion (0644, default 1) turns it off at run time for an A/B. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Diljit Singh <[email protected]>
|
Blockers: 3. What I checked:
Nit: the single-client cost differs between the commit message ("223.2 vs 225.9 ms, within the run-to-run spread") and the PR body ("226.3 ms instead of 222.8 ms (+1.6%)"). Please use the newer measurement in both. HW row: J616s (M4 Pro, G17P, M4 Pro firmware) on this head rebased onto current Assisted-by: LLM (Claude:Opus 5.5) |
What
On the A18 Pro (26A428 firmware), when two clients' renders with mesh shading are on the GPU at the same time, one of them loses part of its mesh output. Either whole mesh workgroups are not drawn, or one view's primitives are shaded with another view's per-primitive data. The second shape is the one behind the prim_query multiview CTS intermittent. The same renders are correct one after the other, and a single client never shows it. It does not depend on the tiler heap: it happens with the heap pre-sized (#2058) and 0 grow requests.
The same firmware build already needs ray-traversal commands run for one client at a time (
g17/traversal.rs). This admits renders with mesh shading by the same rule:aurora.g17_mesh_exclusion(0644, default 1) turns it off for an A/B.traversal_exclusionis set for that firmware build alone. M4 and M5 are unchanged.A mesh render is one flagged
DRM_ASAHI_RENDER_MESH_OUTPUT(#2058; Borealis sets it since mesa#389), or an M5 render with a mesh program.Evidence (Neo J700, hint Mesa = the aurora-wip tree with mesa#389)
Two-client stress: fresh
mvstress --bigprocesses (one draw of 32,768 mesh workgroups over a two-view target) beside 3-iteration victims, several hundred processes per arm, all on one boot.Failing processes:
g17_mesh_exclusion=1)=0)Cost
Root cause, as far as it can be traced
In a trace of the stress, 32-46% of GPU jobs overlap another context's jobs on the GPU timeline without the rule, and 0% with it. Every failure happens in the overlapping regime. There is no macOS comparison: macOS on the Neo runs the 25G83 firmware, not 26A428, and no multi-client macOS trace exists.
🤖 Generated with Claude Code