Repository navigation
drm/asahi: g16: report the spill-carrying compute launch on the M3 - #3603
Conversation
The g16 runtime drives the M3 (T8122) with the 27.2 firmware. That firmware takes the direct compute launch whose word 1 carries the program's thread-invariant spill reservation, the form the M4 uses; J615 runs every dispatch in it. The legacy M3 firmware (the m3 runtime) does not, and both report DRM_ASAHI_GPU_HAL_LEGACY, so userspace could not tell them apart and kept native constant programs off on every M3. Add DRM_ASAHI_FEATURE_COMPUTE_TI_SPILL_LAUNCH (bit 47) and report it from the g16 runtime's T8122 row only. The HAL generation and every other path stay as they are. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
|
Userspace: aurora-silicon/mesa#1335 (merge this first; Mesa ignores the bit until it's reported). |
There was a problem hiding this comment.
Verdict: MERGE at bf1e46c09ec1
Blockers: None (wait for the 20 queued CI checks at bf1e46c09ec1 to finish green; merge before or alongside aurora-silicon/mesa#1335).
Checked:
- uAPI (
include/uapi/drm/asahi_drm.h,drivers/gpu/drm/asahi/file.rs): DefinesDRM_ASAHI_FEATURE_COMPUTE_TI_SPILL_LAUNCHas((1ULL) << 47). Verified bit 47 is unused in both Linux (main, highest prior bit 46DRM_ASAHI_FEATURE_TILE_BUFFER_48K) and Mesa (aurora-wip), and matchesmesa#1335bit-for-bit. - Capability gating (
drivers/gpu/drm/asahi/g16/params.rs): Reported only from theg16runtime (27.2 firmware) whengpu.cfg.chip_id == 0x8122(M3). Legacy M3 (m3runtime) and unmeasured T6030 do not report it;gpu_hal_generationstaysDRM_ASAHI_GPU_HAL_LEGACYso sampler-stream paths remain untouched. - Exact-head hardware evidence (J615 M3,
7.3.0-aurora-ungg15tis+):- Paired with
mesa#1335: CProg 11/11 ondEQP-VK.ubo.random.16bit.all_out_of_order_offsets.1*(130 -> 11 instructions, 23 -> 19 GPRs, 11/11 pass); 16,254 CTS Pass -> Pass, 19,114 NS -> NS, 0 regressions, 0 new GPU faults. - Negative controls: base Mesa on this kernel (CProg 0) and paired Mesa on stock Edge kernel without bit 47 (CProg 0, 16,254 Pass -> Pass).
- Paired with
- Checked for Apple material, tool attribution, private serials, and gating: clean.
Evidence
- Head:
bf1e46c09ec1(base: main,mergeable: MERGEABLE,+23/-0across 3 files). - Hosted CI at
bf1e46c09ec1:3P/0F/20Q(apple-build,host-tests,kunit,rust-build,asahiKUnit queued).
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at |
|
Merging under the 6-point rule (Ryan 09:29, permanent), at |
The M3 (T8122) runs on the g16 runtime with the 27.2 firmware. That firmware takes the direct compute launch whose word 1 carries the program's thread-invariant spill reservation, the same form the M4 uses. The legacy M3 firmware (m3 runtime) does not take it. Both report
DRM_ASAHI_GPU_HAL_LEGACY, so Mesa could not tell them apart and kept native constant programs (preambles) off on every M3.This adds
DRM_ASAHI_FEATURE_COMPUTE_TI_SPILL_LAUNCH(bit 47) and reports it from the g16 runtime for chip 0x8122 only. The HAL generation and every other path are unchanged, which keeps Mesa's separately-qualified sampler-stream path off. This is the dedicated-capability shape Dj asked for.Userspace: aurora-silicon/mesa feat/borealis-g15-hal200-preamble (PR to follow, linked below).
Rows (MacBook Air M3 J615, one-shot boot of 7.3.0-aurora-ungg15tis+ = this branch on main 2fd49a6, dead-man armed, back on saved Edge after)
dEQP-VK.ubo.random.16bit.all_out_of_order_offsets.1*gets a native constant program (CProg 11/11); the main program drops from 130 to 11 instructions (23 to 19 GPRs); 11/11 pass. Base Mesa on the same kernel: CProg 0, unchanged.Not yet: a T6030 (M3 Pro) row. Its g16 row is unmeasured, so it does not report the bit. A KUnit or host check of the feature word would only restate the constant.
Tested: J615 M3 Air at bf1e46c (one-shot, paired with mesa#1335 now merged): bit reported, native constant programs engage (CProg 11/11), CTS 16,254 Pass -> Pass, 0 GPU faults, 0 failed units after.
Risk: two-way · M3 (T8122 on the g16 runtime only; other GPUs do not report the bit)