Repository navigation
drm/asahi: accept the T8122 25G83 mailbox compatible list - #964
Conversation
Bring back, unchanged, the M3 runtime that starts the T8122 (M3 MacBook Air) GPU on the release-20 kernel (c46d7dc, the source of linux-aurora-m3gpu 7.1.12.aurora2-20261017.20): the runtime, its firmware admission, InitData, device, RTKit, memory, submission and client files, the T8122 start experiment, and the 7.1.12 hw tables (hw.rs, hw/t8122.rs, hw/agx3.rs, identity.rs). g15_raw.rs and initdata.rs are the G15 (G15, V14_8_3) expansions of 7.1.12's fw/initdata.rs and initdata.rs: every #[versions(AGX)] item replaced by its G15V14_8_3 instance, which 7.2's version matrix no longer generates. The expansion keeps the source text; its eleven G15 structures match rustc's own expansion of c46d7dc field for field. Nothing declares these modules yet, so this changes no build. The next commits adapt them to the 7.2 driver. Co-authored-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> Co-authored-by: Eryk Wieliczko <github@wieliczko.ninja> Co-authored-by: Satya Benson <satya@benson.earth> Co-authored-by: Naeem Malik <malik2015naeem@gmail.com> Co-authored-by: garymeyerca <garymeyerca@users.noreply.github.com> Co-authored-by: DjDeveloperr <hey@djdev.me> Generated-by: LLM Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Scott Jones <scottajones@gmail.com>
7.1.12 mapped each VM's dummy page at the backend's unknown_page(), which the M3 runtime returned as 0x2ff_ffff_8000, the address its InitData gives the firmware (unk_30). On 7.2 file.rs maps it at uat_geometry().unk_page() instead, which is 0x3ff_ffff_8000 with the runtime's 42-bit geometry, so the firmware's unknown page was unmapped in every T8122 VM. Add a gpu::Gpu::unknown_page() hook, defaulting to the geometry's page so no other GPU changes, and have the M3 backend return RUNTIME_UNKNOWN_PAGE, which also ends its user range, so the two can't drift again. Reported-by: Marcelo Alcantara <maralc@gmail.com> Generated-by: LLM Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Scott Jones <scottajones@gmail.com>
Packet::finish signalled an error fence while the packet could still hold its VM job guard, and nothing on the M3 path quarantined it, so after a timeout userspace could unmap and close memory that work the firmware had not provably stopped was using. Unmap invalidates the TLB, so this ended in a GPU fault rather than freed memory, as on 7.1.12, but 7.2's shared job lifetime can block it. As G15 does, quarantine a guard that is still held before the error fence becomes visible: mapping changes wait until the runtime drops the packet. Guards already released (work never published, or retired) are unaffected. Fix the comment that said this already happened. Reported-by: Marcelo Alcantara <maralc@gmail.com> Generated-by: LLM Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Scott Jones <scottajones@gmail.com>
Once adopt_uat() points TTBAT context 0 at the kernel-owned lower root, a failure in Config::new() or the window sync dropped the UAT and its window inside the start closure, before stop_asc(), and the branch that retains everything when ASC fails to stop could not retain tables that were already freed. Keep both outside the closure: drop them only after ASC has stopped, and leak them with the rest when it does not. Reported-by: Marcelo Alcantara <maralc@gmail.com> Generated-by: LLM Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Scott Jones <scottajones@gmail.com>
Compute::new() read 48 bytes of the client's CDM stream for a debug message, whatever the stream's length, and failed the job if the read did. A short stream ending at a mapped page boundary with the next page unmapped passed the stream checks but then failed its first submission, even with debug logging off (as on 7.1.12). Read no further than the stream, and only log when the read succeeds. Generated-by: LLM Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Scott Jones <scottajones@gmail.com>
A second start of the T8122 runtime in one boot (unbind and rebind, a module reload, or a retry after a failed start) hands the firmware freed tables. Runtime::drop and the failed-start arm free the adopted lower root once ASC has stopped, but TTBAT context 0 still names it, and the next start sets RUN before adopt_uat rewrites context 0. stop_asc only clears RUN, so there is no firmware state to restart from anyway. Refuse every start after the first one of the boot instead. The latch is claimed just before the first ASC start and is never released, and claiming it pins the module, so a reload can't forget it. An unbind and rebind now ends in a clean refusal rather than a second firmware boot, and a reboot is the only way to start the GPU again. Pinning the module also means it can't be unloaded right after an unbind while a completion work item is still queued, which was the reason for draining that work in Backend::stop. Reported-by: Marcelo Alcantara <maralc@gmail.com> Generated-by: LLM Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Scott Jones <scottajones@gmail.com>
Since a failed job's VM is quarantined before its fence signals, Inner::fail_pending quarantines every pending packet's VM, including packets the firmware never saw: it finishes them without releasing their job guards. A check against the active batches can't tell them apart, because a pending packet can be partly published and fail_active drains the active batches before it calls fail_pending. Give each packet a flag that is set before the first firmware-visible change of any batch that includes it: before the producer state of a batch changes, so partial ring appends that overlapping firmware may consume count as published. fail_pending releases the guard only for a packet whose flag is unset. Everything else keeps quarantining as before, including on ECANCELED: cancellation only withdraws a packet's unpublished remainder, and its published commands may still be running. Reported-by: Marcelo Alcantara <maralc@gmail.com> Generated-by: LLM Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Scott Jones <scottajones@gmail.com>
Signed-off-by: Chris Kearney <303316+chriskearney@users.noreply.github.com>
The one-start-per-boot latch pinned the module with __module_get after claiming it. A first probe that isn't the module-init one (deferred, async or a sysfs bind) can run while an ordinary rmmod is under way: once try_stop_module has dropped the reference and marked the module GOING, __module_get revives the count unconditionally, the probe starts ASC, and the module still unloads. The next load then gets a fresh latch and starts the firmware a second time. Take the reference with try_module_get before claiming the latch, and start nothing when the module is already being removed. When another start already holds the latch, drop only the reference this probe just took; the winning claim keeps its reference, so an ordinary unload stays blocked. A forced unload, or a module init that fails after the probe started ASC, still frees the module regardless of references; neither is new here. The order lives in the batch policy (claim_start), so the host test checks it: a pin that fails claims nothing, a start that loses the claim gives back only its own reference, and the winner keeps its reference. Reported-by: Chris Kearney <303316+chriskearney@users.noreply.github.com> Generated-by: LLM Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Scott Jones <scottajones@gmail.com>
…L generation The M3 runtime admits a VM only for a file that asked GET_PARAMS for at least AGX3_PARAMS_SIZE bytes, and that was the size of drm_asahi_params_global. The G17 update grows the structure from 600 to 616 bytes with two optional tail fields, memory_limit and client_memory_limit, so Mesa built against the 600-byte structure would be refused VM creation with EOPNOTSUPP until it is rebuilt. The check only needs to know that the client knows the AGX3 fields. Pin the minimum at the end of gpu_hal_generation, 600 bytes, and assert that value at build time. GET_PARAMS still copies only the size the client asked for. Signed-off-by: DjDeveloperr <hey@djdev.me>
The 25G83 device tree advertises the AGX-specific compatible followed by asc-mailbox-v4. Both bind the same mailbox operations. Admit this exact pair while retaining all resource and identity checks. Exercise the production rejection predicate with public-DTS fixtures and resource mutations; allow optional local DT captures for reproduction. Signed-off-by: Satya Benson <satya@benson.earth>
…records Separate firmware identity, HAL metadata and VM bounds from physical G15G stream selection. Add checked root and owned IO descriptor encoders. Introduce slot 28 at SGX+0xd50000 with a production-writer regression; the shifted T8132 bank is never introduced. Keep VM padding zero. Signed-off-by: Satya Benson <satya@benson.earth>
Build extended initialization owners, controller images and channel records with checked allocation spans. Publish the bounded loader table through existing M3 ownership. Keep extended runtime admission closed. Signed-off-by: Satya Benson <satya@benson.earth>
Construct native queue, pool, context and notifier records. Read controller inputs from the admitted OPP handoff, preserve nanosecond durations and reject unsupported optional flags. Prepare native startup without enabling extended admission. Signed-off-by: Satya Benson <satya@benson.earth>
Dispatch extended firmware compute records through the existing M3 runtime while preserving G15 CDM streams. Retain owned pool backing and leave firmware-managed register setup to the extended interface. Signed-off-by: Satya Benson <satya@benson.earth>
Encode extended tiler and fragment work, scene records, independent notifications and attachment visibility through the existing runtime. Retire native pools and enable only the exact J613 26.6.2 profile. Keep the public UAPI and physical G15 stream formats unchanged. Signed-off-by: Satya Benson <satya@benson.earth>
Signed-off-by: Satya Benson <satya@benson.earth>
Signed-off-by: Satya Benson <satya@benson.earth>
Signed-off-by: Satya Benson <satya@benson.earth>
Signed-off-by: Satya Benson <satya@benson.earth>
Signed-off-by: Satya Benson <satya@benson.earth>
Signed-off-by: Satya Benson <satya@benson.earth>
Signed-off-by: Satya Benson <satya@benson.earth>
The M5 and G18 probes came in with integration/aurora after this series gave AsahiPlatformDriverData an m3 field, so a kernel with CONFIG_DRM_ASAHI_M5 or CONFIG_DRM_ASAHI_G18 no longer builds. Neither probe starts an M3 backend: set the field to None. Signed-off-by: Diljit Singh <hey@djdev.me>
Signed-off-by: Diljit Singh <hey@djdev.me>
Keep both sides of the MAINTAINERS and tools/asahi/run-host-tests.py entries. Signed-off-by: Diljit Singh <hey@djdev.me>
Signed-off-by: Diljit Singh <hey@djdev.me>
Signed-off-by: Diljit Singh <hey@djdev.me>
Signed-off-by: Diljit Singh <hey@djdev.me>
Keep both sides of the tools/asahi/run-host-tests.py entries. Signed-off-by: Diljit Singh <hey@djdev.me>
Signed-off-by: Diljit Singh <hey@djdev.me>
|
I merged integration/aurora (38b2b8b, which includes #1166, #1170 and #1171) into this stack, as new commits only. There are no force-pushes and none of your commits changed.
🤖 Generated with Claude Code |
RyanTheTide
left a comment
There was a problem hiding this comment.
Status of the stack against the current integration/aurora (53dba0e):
- #964, #965, #966, #967, #968, #969, #976 and #977 merge cleanly, and every non-merge commit carries a Signed-off-by.
- #973: commit ea03156 ("selftests: apple: model the H17G method profile in the native26 start...") has no Signed-off-by line. Please add one.
- #973 no longer merges: it conflicts in
Documentation/devicetree/bindings/display/apple,dcp.yamlandtools/asahi/t6030-pmp-graph-tests.c. Please merge the current integration/aurora into it (or rebase).
When you have the external display, fingerprint match and suspend results from the J613, please add them here.
drm/asahi: back off interrupt-assisted M3 completion waits
drm/asahi: admit authorized HIGH queues on Extended T8122
drm/asahi: enable J613 extended firmware render and retirement
drm/asahi: dispatch G15 compute through extended T8122 firmware
drm/asahi: prepare extended firmware queues and controller handoff
drm/asahi: construct and publish extended T8122 initialization data
drm/asahi: describe the T8122 extended firmware profile and owned IO records
Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
J613 hands-on results, 2026-11-10, on a kernel carrying this stack ( |
|
GPT-6.1 Sol on @satchlj's behalf 2026-11-10 J613/T8122 sleep diagnostic, not a successful suspend/wake qualification. Kernel composition: integration dc8f6f7 (contains #964), current #973 3f8f6bb plus #971 f891a95 for internal input. Release 7.3.0-aurora73-pr973-3f8f6bb-971-ARCH; UKI SHA256 852792b76ac9acf6e0c6343bd9146be1d92373fb348c93f1e27a40b9c73c7186. No isolated attribution to #964. RTC0 exists and sets the correct boot time, but has no wakealarm interface. No reliable timed wake was available, so no real s2idle was entered. Ran self-returning pm_test=devices, then a separate pm_test=platform attempt using |
|
GPT-6.1 Sol on @satchlj's behalf 2026-11-10 J613 returning PM diagnostics after the #971 live-MTP DART suspend/resume correction. The earlier composition aborted at 2fa808000.iommu with -16. On this composition freezer/devices/platform each returned rc=0 and reached a five-second checkpoint; no DART EBUSY or retained-state-loss message, input devices remained registered and panel/backlight restored. pm_test returned to none. RTC0 has no wakealarm interface: no alarm armed/fired, no real s2idle, no wake test and no sleep-power measurement. With state=freeze the processors/core checkpoints occur after s2idle_loop, so those levels were not attempted. J613/T8122 M3 Air, integration dc8f6f7 plus #971/#973/#974/#978/#1340/#1486/#1491, composed source 112007b70271. Hardware-tested release 7.3.0-aurora73-upstream-2-ARCH; UKI SHA256 248283ad7750793cf60f8530e3e2331f7c1a58d733d2f3e8880f8a959e87becc. Composition evidence, not an isolated PR kernel. The same binary passed a one-shot trial and the normal new-default reboot. Installed package revision 30.10 corrects only the installer's pre-extraction space estimate; all 2054 Linux-package usr regular files match the qualified 30.9 package. Stage1/Stage2 unchanged, four boot hooks masked. |
|
GPT-6.1 Sol on @satchlj's behalf J613 / T8122 M3 MacBook Air timed-wake results, internal display only. Kernel Timed wake required RTC alarm wiring carried by a one-shot trial boot loader; it is not provided by the unchanged normal Stage 2. The kernel already contains the RTC alarm support and SPMI IRQCHIP_SKIP_SET_WAKE. The initially deferred RTC was missing its SPMI controller's explicit AIC interrupt-parent; adding it restored the IRQ domain and rtc0/wakealarm.
S2idle with an external display is still owed for #973. This does not qualify deep sleep or a default boot-loader rollout. The installed normal Stage 2, menu and default UKI were left unchanged. |
Accept the exact T8122 AGX mailbox compatible pair from 25G83 without relaxing resource or identity checks. Include the public T8122 runtime foundation that Aurora’s omacom sync held back; its policy/qualification hold remains open. Separate 7.3 adaptations retain Aurora’s identity-selected hwdata, binding ownership and MMIO lifetime/transaction rules, and use current module-metadata and DMA-address APIs.
Port of omacom/linux-aurora#302. The original PR remains untouched.
Carried dependencies (original patch, complete message, authorship and dates preserved; 7.3 adaptations are separate commits):
e51f1082fa2384ef8e4d724dad52c9b317f6e45af192f61d8e864a57c40ee16c5bbae3f875c5823f60b3eae5bfa6b7d3d2666d8ca7a5c9dcc611f3f1e8023bba60e634b754f9d5cf8a31fe1856860486865371b461eccdbbee806b505f46bda16246daaee9d200311a5359dafc5391123e5ac297e5a4401080958cd5a4956cdb981acb5b18c64047548cba17f5af0ba04b7aa809ff54a8f092b08ba0@scottjones @chriskearney @DjDeveloperr @RyanTheTide
This carries Scott Jones's T8122 runtime and safety foundation from omacom/linux-aurora unaltered, because Aurora doesn't have it yet and this change builds on it. If you'd rather land it separately or differently, say so and I'll rework this.
This carries Chris Kearney's M3 native defaults and startup diagnostics from omacom/linux-aurora unaltered, because Aurora doesn't have it yet and this change builds on it. If you'd rather land it separately or differently, say so and I'll rework this.
This carries DjDeveloperr's M3 client parameter admission and timestamp adapter from omacom/linux-aurora unaltered, because Aurora doesn't have it yet and this change builds on it. If you'd rather land it separately or differently, say so and I'll rework this.
Aurora #783 held this foundation pending identity-selected constants and J613/J615 qualification. This port does not clear that hold.
Validation: arm64 defconfig + asahi.config, Image/modules/DTBs with BTF and KUnit enabled, LLVM 18/Rust 1.85.0, passed at stack top #347 (
7b88ebb77e46), which includes this branch. The validated integration base is b500668. QEMU loaded the test-bearing modules successfully with no additional failures. The combined run retains four pre-existing SEP store failures (plus their suite aggregate), reproduced on the unmodified Aurora base. The unmodified pinned base also crashes in apple-av-audio-lifetime/av_lifetime_devres_order; that unrelated audio suite is explicitly excluded. All tests added by these ports run through KUnit debugfs on Cortex-A76. This is not a fully green or complete-tree KUnit run. The mailbox-compatible fixture passed normally and with optimized Python. No 7.3 hardware boot or deployment has been performed.