Skip to content

Sync omacom #177 (G15, T6030 dock, platform fixes) onto 7.3 - #395

Merged
RyanTheTide merged 132 commits into
integration/aurorafrom
aurora-wip-sync-177
Oct 25, 2026
Merged

RyanTheTide merged 132 commits into
integration/aurorafrom
aurora-wip-sync-177

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Ports the Aurora work that omacom/linux-aurora integration/aurora merged in omacom/linux-aurora#177 (42672ed79d) onto the 7.3 tree, based on integration/aurora at d7fc14ef83. #388 covered omacom up to 70d5dcedfa; this picks up from there. Commits were cherry-picked oldest first with -x, with their original messages, authors and author dates.

omacom/linux-aurora#177's history holds 2,773 non-merge commits after 70d5dcedfa because it carries Ryan's 7.2.11 update (omacom/linux-aurora#158). The new Aurora work is the 131 commits on top of that update. 123 of them are ported below. The rest of the history is covered under "Not ported".

omacom Author Change
bd4c585987 Chris Kearney usb: typec: mux: zero the device arrays the duplicate checks scan
30f320344e Thomas Glanzmann ASoC: cs42l42: keep the codec on the oscillator until SCLK runs
4b69aec0b4 Chris Kearney ASoC: cs42l84: keep the codec on the oscillator until BCLK runs
072a552931 Chris Kearney ASoC: cs42l42: test that unmute waits for D0 and a locked PLL
d6ec03d9bb Chris Kearney ASoC: cs42l84: test that unmute waits for D0 and a locked PLL
a9a9c3a21a Chris Kearney media: apple: avd: bound the optional firmware codec trailer
51d20a0229 Chris Kearney tools/asahi: exercise firmware codec tail bounds and fallback
e3e8dd446e Chris Kearney ASoC: cs42l42, cs42l84: initialize the 7.2 power reference in tests
7fcb47dca8 Chris Kearney thunderbolt: defer DP pairing until DPRX retirement releases paths
3975d42d2b Chris Kearney thunderbolt: preserve deferred DP pairing across sleep
bc1b422472 Chris Kearney thunderbolt: replay deferred DP pairing after runtime PM is enabled
81399ec579 Chris Kearney tools/asahi: check DP repair against the maintained DPRX callback
0c4d483cde Chris Kearney mm/mremap: user4k: reset the sub-page offset of an unfaulted DONTUNMAP source
60b2346a77 Chris Kearney phy: apple: implement the T6030 source-aware tunnel clock provider
873dae4fc3 Chris Kearney drm/apple: support both T6030 Thunderbolt dock display streams
5cefcd651c Chris Kearney drm/apple: route a lone T6030 dock DPIN1 stream without waiting for a tile
0c4e44fadb Chris Kearney soc: apple: opt native T6030 GPUs into the admitted PMP supplier
5108272d51 Chris Kearney pmdomain: apple: read readiness from the passive T6030 report
da0d7366d2 Chris Kearney tools/asahi: exercise native T6030 supplier admission and passive readiness
c6b25d8731 Chris drm/apple: check T6030 tunnel clock policy parity
191c603da5 Chris Kearney phy: apple: make legacy USB3 handoff completion retryable
951b351f57 Chris Kearney phy: apple: exercise legacy handoff on the current PIPE lifecycle
ae83957344 Chris Kearney drm/apple: initialize the deferred attributes hotplug fixture
2790d5f9cc Chris Kearney phy: apple: check role selection after Type-C lane setup
8b375a94c0 Chris Kearney rust: platform: allow a retained device to suppress manual bind attributes
ead6240dd7 Eryk Wieliczko drm/asahi: g15: Add the UAPI glue and register the G15 generation
fa787b7493 Naeem Malik drm/asahi: g15: Add the T6031 (M3 Max, G15C) configuration row
9cb33dc3da Naeem Malik drm/asahi: g15: Pin the J516C GPU firmware build
0fb95eb96f Naeem Malik drm/asahi: g15: Build the J516C initdata from its board images
fdebd3691f Naeem Malik drm/asahi: g15: Encode compute commands with the G15C register values
c11ed02dd2 Naeem Malik drm/asahi: g15: Admit and map UAT regions that are reserved System RAM
dc5efef19a Naeem Malik drm/asahi: g15: Accept the J516C 14.8 GPU firmware build
2b48ebfdfe DjDeveloperr drm/asahi: g15: Reject a scissor base that overflows the address space
b3950e789e DjDeveloperr drm/asahi: g15: Do not fail a published prefix on a group allocation failure
cbf9e2f510 DjDeveloperr drm/asahi: g15: Release a closed VM's state when its handle goes
c721556fae DjDeveloperr drm/asahi: g15: Release the power hold and the PMP vote when a start fails early
c8f2fb8276 DjDeveloperr drm/asahi: g15: Only mark used pass slots dirty on release
2f1695ba1c DjDeveloperr tools/asahi: Drop the removed T6031 knobs from the M3 runtime tests
34454f9c6d Chris Kearney drm/asahi-m3: adapt the native G15 driver to the 7.2 driver core and DRM device API
bc1469fc63 Naeem Malik drm/asahi: g15: Say what to report when the GPU firmware build is unknown
960daadb4b Naeem Malik drm/asahi: g15: Move the board template fill into a core-only submodule
9c74d00b22 Naeem Malik drm/asahi: g15: t6031: Build Globals and Power from the device tree
197338dc78 Naeem Malik drm/asahi: g15: board: Review fixes for the device-tree Globals and Power
2b68e976bd Naeem Malik drm/asahi: g15: t6031: Build the hardware record from the device tree
9ea57494d2 Naeem Malik drm/asahi: t6031: take the idle standby time from the GPU node
bc432735e6 Chris Kearney drm/asahi: g15: t6031: refuse board-data values that do not fit in u32
cb3658e9c0 Chris Kearney selftests: asahi-g15: run the T6031 board-data and firmware-lookup tests
4652befd33 Chris Kearney drm/asahi: g15: t6031: test that no GPU node value panics the record builder
7b916b525e Naeem Malik drm/asahi: g15: Read back the GPU's performance state in debugfs
af6c3b71f3 Naeem Malik drm/asahi: g15: t6031: Leave the 42 record words the firmware does not need zero
76d0a346dd Chris Kearney drm/asahi: g15: m3: complete the stats record loads before consuming them
96b387c6f3 Naeem Malik drm/asahi: g15: Seed the compute UMA freelist with every pool
a525207506 Naeem Malik drm/asahi: g15: Leave PB growth requests unanswered after two refusals at the maximum
dec88ab3f2 Naeem Malik drm/asahi: g15: Keep PB blocks above the firmware's growth maximum for partial renders
07aae9451c Naeem Malik drm/asahi: g15: Map a 512 MiB parameter buffer heap
821fd4d5a9 Chris Kearney drm/asahi: g15: m3: keep every PB ledger below the block list's K
7739f90703 Chris Kearney drm/asahi: g15: m3: say what a PB refusal does and size the heap right
59ee84c52f Chris Kearney drm/asahi: g15: m3: check firmware-object backing geometry with checked arithmetic
4340ecf02c Chris Kearney drm/asahi: g15: m3: map the PB backing into each VM when it first runs
ac670ded39 Chris Kearney drm/asahi: g15: m3: back the PB on demand, before an answer posts it
0f366074d0 Chris Kearney drm/asahi: adapt retained-G15 hooks to the maintained shared APIs
3f80156817 Chris Kearney drm/asahi: port the native G15 adapter onto maintained DRM registration
3d5eff3c69 Chris Kearney drm/asahi: g15: allocate driver data before touching firmware
cbb678e9a1 Chris Kearney drm/asahi: g15: defer firmware start until module registration completes
2b4865108f Chris Kearney drm/asahi: g15: make maintained loader contracts independent of SF profiles
40f6a104c5 Chris Kearney drm/asahi: test maintained G15 admission, rings and demand backing
b90f94097c Chris Kearney drm/asahi: use the native private wire in G15 command consumers
4e442bae52 Chris Kearney soc: apple: sep: reserve the xART list key before the write, flush the list's directory
80374c2d26 Chris Kearney drm/asahi: isolate the native G15 command ABI behind a private facade
5eae607d5e James A DellaMorte power: supply: macsmc: add "auto-discharge" charge behaviour for CHLS
4570e9293b Chris Kearney mfd: macsmc: let client tests stub key reads and writes
659fced438 Chris Kearney power: supply: macsmc: serialize charge settings and offer auto on CHLS-only Macs
4aa5a5a9b1 Chris Kearney drm/asahi: g15: reject errored input dependencies before publication
1bfbde6016 Chris Kearney drm/asahi: g15: bound device-wide live logical queue capacity
186b2143a9 Chris Kearney drm/asahi: expose the inherited-error policy only for native G15
ea34dfd32a Chris Kearney ci: register the native G15 host regression suites
3894870158 Eryk Wieliczko dt-bindings: dma: apple,sio: Add the T6030 compatible
a067a4452c Eryk Wieliczko dmaengine: apple-sio: Configure the T6030 channels as its firmware expects
ed526eeb70 DjDeveloperr arm64: configs: asahi: Configure the T6030 SIO channels
4fc1ad4c41 Chris Kearney dmaengine: apple-sio: Start the T6030 SIO only with protocol-10 tables
0cdb02d152 Eryk Wieliczko dt-bindings: power: apple,pmgr-pwrstate: Add apple,no-auto-pm
9b81c1ed4f DjDeveloperr dt-bindings: power: apple,pmgr-pwrstate: document apple,inherited-on
8a9c76167b Eryk Wieliczko pmdomain: apple: pmgr-pwrstate: Honour apple,no-auto-pm
726c720383 Chris Kearney pmdomain: apple: pmgr-pwrstate: Test apple,no-auto-pm on power on and off
e25291b862 DjDeveloperr drm/apple: iomfb v14.7: add the J514C (M3 Max 14-inch) board record
f40b34dbec Eryk Wieliczko drm: apple: iomfb v14.7: take an HDMI 2.1 sink's catalog of more than 1 MiB
a95ade05bd Chris Kearney dmaengine: apple-sio: Refuse T6030 boot parameter keys wider than 16 bits
70db766a58 Chris Kearney dmaengine: apple-sio: Refuse a T6030 window entry whose owner is unresolved
5d6df0fa6c Chris Kearney dmaengine: apple-sio: Select DMA_VIRTUAL_CHANNELS
9606d86102 Chris Kearney dmaengine: apple-sio: Leave a T6030 SIO stopped without APPLE_SIO_T6030
4a834d3ece Eryk Wieliczko arm64: mm: Export dcache_clean_poc()
702d202734 Chris Kearney drm/asahi: export a T6030 module alias for the native G15 driver
4b9f1867e9 Eryk Wieliczko arm64: dts: apple: t6030: Describe the J514S HDMI port's audio
3fe0ef0501 Eryk Wieliczko drm: apple: Add the DCP 14.7 external role's HDMI audio
60cf39d2b6 Chris Kearney drm/apple: start the external audio work disabled
d77545593e Chris Kearney drm/apple: iomfb v14.7: keep the sink's audio when an external mode set fails early
475ec47c3d Eryk Wieliczko drm/apple: afk: the 14.7 external role's reply byte and re-announced AV service
f508db5742 Eryk Wieliczko drm/apple: dpavservep: open and close the 14.7 external role's AV client
7114f86c67 Chris Kearney drm/apple: name the audio link and status commands by what they do
8fced0f14e Chris Kearney drm/apple: test the external audio work and an audio interface without SIO
e7f159b1c1 Chris Kearney drm/apple: dpavservep: tie the 14.7 AV client to the instance it opened
1885f09fb8 Chris Kearney drm/apple: av: keep the 14.7 audio client on its own instance
f627d7748d Chris Kearney drm/apple: av: carry a Terminate's instance through its whole disconnect
4c2b41a0e3 Chris K pmdomain: apple: restore gated T6030 managed PMP startup
b98a622416 Chris Kearney drm/apple: directly call the bounded DMA region translator
c92409794c Chris Kearney drm/apple: dpavservep: test that a Close keeps a Terminate in force
bdc2a8f3ff Chris Kearney test: exercise the actual T6030 halted-PMP consumer graph
9e92539b45 Chris Kearney drm/apple: admit T6030 G15 only after native display registration
75975401f3 Chris Kearney drm/asahi: require a callable native display provider for G15
d61c8e4c48 Chris Kearney selftests: asahi-g15: exercise display admission before the PMP link
068fd0978d Chris Kearney thunderbolt: apple: let T6030 DP IN tunnels wait for a display pipeline
efd18a9267 Chris Kearney tools: asahi: format the host test fixtures in kernel style
a5a2f023bd Chris Kearney selftests: apple: cover the newly admitted J514C panel record
31da169251 Chris Kearney selftests: apple-dcp: follow the T8103 USB3 retry, T6030 dock and 14.7 AV client
669333d2fa Chris Kearney arm64: asahi: keep the Apple CIO reset controller built in
caafb8e7a1 Chris Kearney drm/asahi: retain live G15 storage after allocation failures
46420c40af Chris Kearney ASoC: cs42l84: retain the card-resume unmute
8c26443880 Chris Kearney drm/apple: validate the plane layout sent to DCP
b0effd1c9b Chris Kearney selftests/apple-dcp: cover layout bounds through DRM format admission
99e2571448 Chris Kearney ASoC: cs42l42: require playback prepare for the base-M1 SCLK workaround
aac315db18 Chris Kearney phy: apple: restrict the USB3 handoff workaround to base M1
99043939ac Chris Kearney drm/apple: drain AV owner work before endpoint teardown
d60121ff24 Chris Kearney selftests: aurora-sep: replace the stalled sensor fixture atomically

New commits for 7.3, by DjDeveloperr:

Commit Change
e085a95c50 tools/asahi: follow the 7.3 DPRX callback in the DP repair test
48e11855fc tools/asahi: model deferred PMP requests in the T6030 graph test
fc13d05b1d drm/asahi: g15: adapt the native G15 backend to the Linux 7.3 Rust APIs
18ba468d82 power: supply: macsmc: test the refused out-of-range end thresholds

Adapted (commit messages unchanged):

  • 0c4d483cde (user4k, MREMAP_DONTUNMAP): 7.3 already resets vm_pgoff and the anonymous page offset of an unfaulted source with vma_set_pgoff() and vma_set_anon_pgoff(). The sub-page offset is set next to them with vma_set_subpage_offset(), as insert_vm_struct() does on 7.3, instead of with vma_set_page_offset().
  • 0f366074d0 (shared G15 hooks): the new Gpu::feature_flags() hook reads fault_control by value, as 7.3's ModuleParam::value() returns it. File open keeps this tree's per-client GPU memory accounting next to the new user_range() hook. On the d7fc14ef83 base, gem_create also passes its registration data, which this commit renames to reg_data, to the large-BO reclaim policy from drm/asahi: fail large G17 backing population without direct reclaim #397. gem.rs keeps both that policy's user_pages_no_reclaim() and the new prepare_new_object().
  • 3f80156817 (G15 adapter registration): 7.3's of_device_table!() does not accept attributes on its entries. A small local macro builds the maintained OF table and adds the T6030 and T6031 entries only when DRM_ASAHI_G15 is off. The table is the same as on omacom in both configurations.
  • 81399ec579, 951b351f57, ea34dfd32a, caafb8e7a1 and b0effd1c9b leave out their tools/aurora-ci/host-tests.json hunks. That file is part of omacom's CI, which this tree does not carry (as in Sync omacom integration/aurora work onto 7.3 #388).
  • 0c4e44fadb, 5108272d51 and 4c2b41a0e3 conflicted only on context in pmp-report.c, next to this tree's deferred PMP requests. Their changes apply unchanged.

Not ported:

Config effects (package configuration plus asahi.config, after olddefconfig):

  • RESET_APPLE_CIO changes from m to y (669333d2fa). asahi.config also drops its duplicate TYPEC_SN201202X and USB4_APPLE_SOC lines. Both stay m, and the two olddefconfig override warnings go away.
  • Newly enabled: APPLE_SIO_T6030=y and DRM_APPLE_DCP_T6030_AUDIO=y. Both affect only T6030. DP/HDMI audio stays behind the existing hdmi_audio parameter.
  • DRM_ASAHI_G15 is new, off by default and not set by asahi.config. It selects the hidden APPLE_T6030_GPU_PMP_LINK. While it is off, T6030 and T6031 stay on the maintained GPU driver.
  • No other symbol changes in the resolved configuration.

Testing:

  • Built with the same recipe as Sync omacom integration/aurora work onto 7.3 #388: the linux-aurora package configuration plus asahi.config, olddefconfig and CONFIG_RUST=y, giving 7.3.0-ARCH. Toolchain: clang/LLVM 18.1.8, rustc 1.85.0, and the tree's bindgen 0.73.2. The base d7fc14ef83 was built in full, then this branch incrementally in the same output directory.
  • Image, modules (1,916, as on the base) and all 116 Apple DTBs (including the base's new J616s) build. There are no new warnings. The two existing Rust dead-code warnings (store.rs, t8140_aop_audio.rs) are unchanged, and the two config override warnings are gone. CONFIG_RESET_APPLE_CIO=y after olddefconfig.
  • Opt-in G15: the same configuration with DRM_ASAHI_G15=y builds and links asahi.ko. The G15 code then reports 27 dead-code warnings (unused constants and helpers under g15/), which do not appear in the shipped configuration.
  • KUnit on arm64 QEMU with 16K pages, using a configuration focused on the suites this touches: Cirrus codecs, SMC battery, SIO, PMGR power states and PMP report, display gate, DCP display, fabric and audio, ATC PHY, DP IN lifecycle, Thunderbolt, Type-C mux and AVD. 51 suites, 678 cases: 677 pass, 1 skipped by the suite itself (S35_dual_retry_off), 0 fail. The first run failed macsmc_charge_end_threshold_test; 18ba468d82 fixes it.
  • Host tests that Integrate reviewed G15, T6030 dock and platform fixes on the 7.2.11 update omacom/linux-aurora#177 adds or changes, taken from omacom's CI list (run from the top of the tree):
    • Pass: avd-codec-tail-tests.py, dcp14-panel-tests.py (both variants), tunnel-route-tests.py, tb-dp-repair-tests.py (16 cases, 16 mutants caught), t6030-clock-tests.py, t6030-wiring-tests.py, tiled-split-tests.py, t6030-pmp-supplier-tests.py, t6030-pmp-graph-tests.py (18 cases, all mutants caught), t6030-display-admission-tests.py, t6030-display-linkage-tests.py, atc-usb3-tests.py, apple-dcp/plane-layout.py, the eight g15-*-tests.py suites and asahi-g15/run.py.
    • The G15 Rust host tests ran with the host's rustc 1.99.0. omacom's CI pins 1.93.1.
  • Not boot-tested on hardware.

Known issues:

  • The apple-dcp host runner (tools/testing/selftests/drivers/gpu/apple-dcp/run.sh) passes 51 of 57 cases, the same as on the base. service-rebind, cpuidle-s2idle, probe-mux-pm-dispatch, dwc3-teardown, same-handle-srcu-index and mux-release-stages already fail on 8c2774e57f. The commits since then do not touch the sources these fixtures use.
  • tools/aurora-sep/tests/test_m3_max.py (its fixture changes in d60121ff24) runs 68 cases. SameAs122Test.test_every_board_runs_as_on_12_2 fails for 4 to 7 boards per run, on this branch (6, then 4) and on the base (7), with a different set of boards each time. In each failure, a "Verification timed out" line appears in only one of the two runs being compared. The test is timing-dependent on this host; the kernel changes do not cause it.
  • These changes also reach Macs other than the M3 Pro/Max:
    • Thunderbolt connection manager, on every USB4 host (generic code): DP pairing after a DP resource becomes unavailable is queued on the domain workqueue instead of running inline. A pending pairing is replayed after sleep and runtime resume. omacom has not tested this on M2 or base M3 hardware.
    • Base M1 (t8103) only: the ATC PHY USB3 handoff becomes retryable, with deferred role routing. The CS42L42/CS42L83 resume workaround drops PCM RESUME for playback, so userspace prepares the stream again after resume.
    • CS42L42 and CS42L84 on every Mac: if the PLL does not lock on unmute, the codec now stays on its internal oscillator and the unmute returns an error. Before, the driver only warned.
    • SMC charging on Macs that use the CHLS key: setting the end threshold no longer turns on forced discharge. Discharging down to the limit is now the opt-in auto-discharge charge behaviour. CHLS-only Macs gain a charge_behaviour attribute (auto, auto-discharge). Probe clears a forced-discharge bit that was left set without a limit. The auto-discharge value follows the still-open power: supply: macsmc: add "auto-discharge" charge behaviour for CHLS AsahiLinux/linux#521 and may change.
    • DCP planes on every Mac: plane layouts are checked at atomic check with the same geometry that is sent to the display processor. P030/P230 framebuffers with the Interchange modifier are refused. Their linear forms and the integer-bpp Interchange formats used for compressed RGB scanout are unchanged.
    • DCP AV endpoint, on every Mac where DP/HDMI audio is enabled: audio owner work is stopped and drained before endpoint teardown.
    • SEP: the xART guard reserves its list key before writing and flushes the list's directory.
    • RESET_APPLE_CIO is built in on every Mac.

🤖 Generated with Claude Code

chriskearney and others added 30 commits October 23, 2026 01:56
fwnode_typec_switch_get() and fwnode_typec_mux_get() pass a stack array
to fwnode_connection_find_matches(). The array collects the devices found
so far. 7.2's typec_switch_match() and typec_mux_match() scan every slot of
that array to skip a device already matched, but the property walker only
fills the slots it has written. So the scan reads uninitialised stack
pointers. With CONFIG_INIT_STACK_NONE, as in our production configs, a
stale pointer that happens to equal the device makes a real match look
like a duplicate and drops it.

Zero both arrays. Empty slots are then NULL and never equal a device, and
the duplicate skip, its put_device() and the unavailable-ancestor
semantics are unchanged.

An MSan harness built from the actual callbacks, getters and property
walkers reported use-of-uninitialized-value from mux_devs and sw_devs
before this change. All 12 lookup cases are clean after it, including
duplicate put_device balance and the absent, missing and
disabled-ancestor cases.

Generated-by: LLM
(cherry picked from commit 9d6d38611817dd6944c07eae4093923de13425bc)
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit bd4c585)
After a suspend with a headset playing there is no sound after
resume. The ASoC resume work unmutes the DAIs that were active at
suspend while the card is still below D0. At that point the PCM is
suspended and the host may not be driving SCLK yet, but
cs42l42_mute_stream() already moves the codec from the internal
oscillator onto SCLK. Without a clock the codec stops answering on
I2C, and the stream stays dead until the codec is reset.

Do not do the switch while the card is not in D0. The unmute that
follows the next prepare switches the clock once SCLK runs.

A PLL that fails to lock leads to the same state, because the codec
switched to the PLL output anyway after printing a warning. Stop the
PLL, stay on the oscillator and return the error instead.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
(cherry picked from commit e05ef13)
(cherry picked from commit dffa7599a7f8a3a46bfcef07f16f44f611aef122)
(cherry picked from commit 30f3203)
Based on aurora-silicon/linux PR331 (e05ef13, "ASoC: cs42l42: keep
the codec on the oscillator until SCLK runs", Thomas Glanzmann). That
commit only changes cs42l42, and the Apple laptops use a CS42L84 for
the headphone jack, so it does not affect them. This applies the same
change to cs42l84_mute_stream().

ASoC resume sets the card to D2, unmutes the playback DAIs that were
active at suspend and only then sets D0. At that point the PCM is
suspended and the Apple MCA may not be driving BCLK yet, but the unmute
already moves the codec from its internal oscillator onto BCLK or the
PLL. Without a clock the codec stops answering on I2C.

Do not touch the clocks while the card is not in D0. MCA does not
advertise SNDRV_PCM_INFO_RESUME, so userspace prepares the stream again
after resume, and the unmute that follows that prepare does the switch
at D0.

If the PLL does not lock, the codec used to switch to the PLL output
anyway after a warning. Instead stop the PLL, clear REFCLK_EN again (the
same order as the mute path, which first moves the codec back to the
oscillator) and return the error, leaving the codec on the oscillator,
the DAC muted and stream_use unchanged so the next unmute retries.

The PLL lock error bit stays a warning. It is only checked after the
lock bit has been seen set, and nothing in the driver says what it means
beyond its name, so making it fatal could break setups that work today.

The BCLK path without the PLL is unchanged apart from the D0 check.

Generated-by: LLM
(cherry picked from commit 3a2865f65fdb396e1f3e011127ede58b753b06cf)
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 4b69aec)
Add a KUnit suite for the clock switching in cs42l42_mute_stream().
The tests call the driver's own cs42l42_pll_config() and
cs42l42_mute_stream() on a component backed by a regmap whose
callbacks log every register write, with the PLL lock status under
test control and a sound card whose power state the test sets.

- unmute_below_d0_does_nothing (D1, D2, D3hot, D3cold): an unmute
  while the card is below D0 makes no register access and leaves
  stream_use clear and the headphone muted. Catches the codec being
  moved onto SCLK by the ASoC resume work before the stream runs.
- resume_unmute_then_d0_unmute: the resume order. The unmute at D2
  does nothing and the unmute at D0 does the whole switch.
- unmute_pll_locked: at D0 with a PLL clock configuration the PLL is
  started, the lock bit is polled, then the PLL output is selected,
  the codec moves to SCLK and the headphone is unmuted, in that order.
- unmute_pll_lock_timeout: when the PLL never locks, the unmute
  returns -ETIMEDOUT, stops the PLL again and does not select the PLL
  output, switch to SCLK or unmute the headphone. Catches the old
  behaviour of warning and switching to the unlocked PLL anyway.
- unmute_after_pll_lock_timeout: after a failed unmute stream_use is
  still clear, so the next unmute with a locking PLL does the whole
  switch.
- mute_returns_to_osc: muting the last stream goes back to the
  oscillator before deselecting and stopping the PLL.
- unmute_no_pll: with SCLK used directly as MCLK the codec moves to
  SCLK without touching or polling the PLL.

The PLL cases run with an N = 2 and an N = 1 clock configuration. A
full run takes well under a second because the lock timeout is short.

Generated-by: LLM
(cherry picked from commit 3822f19ae8831ce9544c4518374a1f51993c7ce2)
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 072a552)
Add a KUnit suite for the clock switching in cs42l84_mute_stream().
The function and the PLL setup are static, so the test file is included
at the end of cs42l84.c when CONFIG_SND_SOC_CS42L84_TEST is enabled.
The tests set the clock with snd_soc_dai_set_sysclk() and
cs42l84_pll_config(), and mute and unmute through
snd_soc_dai_digital_mute() and the driver's own DAI ops. The component
is backed by a regmap whose callbacks log every register write, with
the PLL lock status under test control and a sound card whose power
state the test sets.

- unmute_below_d0_does_nothing (D1, D2, D3hot, D3cold): an unmute
  while the card is below D0 makes no register access and leaves
  stream_use clear, the DAC muted and CCM_CTL1 on the oscillator.
  Catches the codec being moved onto BCLK by the ASoC resume work
  before the stream runs.
- resume_unmute_then_d0_unmute: the resume order. The unmute at D2
  does nothing and the unmute at D0 does the whole switch.
- unmute_pll_locked: at D0 with a PLL BCLK rate, REFCLK_EN and the PLL
  are enabled, the lock bit is polled, then CCM_CTL1 selects the PLL and
  the DAC is unmuted, in that order.
- unmute_pll_lock_error_bit: the lock error bit next to a set lock bit
  is only reported, the switch still happens.
- unmute_pll_lock_timeout: when the PLL never locks, the unmute returns
  -ETIMEDOUT, CCM_CTL1 is never written, PLL_CTL1_EN and then
  REFCLK_EN are cleared again, and the DAC stays muted with stream_use
  clear. Catches the old behaviour of warning and switching to the
  unlocked PLL anyway.
- unmute_after_pll_lock_timeout: after a failed unmute the next unmute
  with a locking PLL does the whole switch.
- mute_returns_to_rco: muting the last stream mutes the DAC, goes back
  to the oscillator, then stops the PLL and REFCLK.
- unmute_bclk: with BCLK used directly as MCLK the codec moves to BCLK
  without touching or polling the PLL.

The suite runs in well under a second.

Generated-by: LLM
(cherry picked from commit 7560c8b4747f79cf18d8ac90c11f6bec9f4e2eca)
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit d6ec03d)
The optional CODECS trailer occupies the final 64 bytes of the firmware.
A successful firmware request does not establish that minimum length, so
forming and reading the trailer pointer can read before a truncated image.

Check the image length before forming the pointer and only parse an
available trailer. Short images keep the existing legacy variant-capability
fallback, as do larger images without the CODECS marker. The supported
codec intersection and normal firmware handling are unchanged.

An actual-block ASan/UBSan harness reproduces invalid reads at firmware
lengths 0, 1, 7 and 63 on the parent. The guarded code passes those limits,
64/128-byte trailer controls, legacy fallback and variant intersections.

Fixes: 883ff44 ("media: apple: avd: Announce only codecs the firmware supports")
Generated-by: LLM
(cherry picked from commit 703cabfcbe35d99f8457ef1cc781a051e4a3ad3a)
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit a9a9c3a)
Extract the production AVD codec-tail block and capability definitions
into an ASan/UBSan host harness. Cover 0/1/7/63-byte firmware boundaries,
64/128-byte tails, all codec bits, the variant-capability intersection,
unknown/no-marker trailers, and the legacy capability fallback.

Keep a before/after control around runtime mutations that remove the
length guard, the variant intersection, or the legacy fallback. Record
source hashes, compiler commands and per-case output in an external
evidence directory. --ref reproduces the missing-bound defect on the
parent without changing the checked-out source.

Both GCC 16.2.1 and Clang 22.1.8 pass all 20 cases in both controls, and
all three mutants build and fail the intended runtime cases. Parent
10ff0fe fails exactly the four short-image cases on both compilers.
These are host parser tests, not firmware loading or hardware tests.

Generated-by: LLM
(cherry picked from commit 3d480b94dbbb41d7ca140bf93fc461e18df0c3d4)
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 51d20a0)
Linux 7.2 replaces the sound-card power_ref atomic and separate power_ref_sleep waitqueue with struct snd_refcount. Initialize the same power_ref object as snd_card_init(), while preserving the independent power_sleep waitqueue. This adapts only the two KUnit fixtures; codec behavior is unchanged.

Reference: 2fa8d8b (ALSA power-reference conversion)

Generated-by: LLM
(cherry picked from commit 1b3f2ecf19448f66359efa1417bc760d129dba4d)
(cherry picked from commit c51022a6cc32efa48096ad043d6aedda19f0d1e2)
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit e3e8dd4)
A failed DPRX completion removes the tunnel from the connection manager,
but the completion worker still owns a reference. Immediate DP pairing
then tries to reuse the old output adapter's fixed HopIDs before the
worker drops that reference and destroys its paths. Allocation fails and
no pairing pass follows the final put.

Queue pairing on the ordered domain workqueue so DPRX completion can
release its paths first. Keep no port pointer in the queued work. Balance
one domain reference per queued execution, including coalescing, and take
runtime PM before the domain mutex. Recheck hotplug activity and the root
router under that mutex so stopped domains do not recreate tunnels.

Exercise the actual retirement, queue, repair and completion-tail bodies
with modeled paths, workqueue and runtime PM. Cover reference balance,
coalescing, stop before/after queueing and during resume, missing root,
PM failure, requeue while running and actual probe initialization. Nine
ASan/UBSan cases pass; nine valid runtime mutants are rejected. This does
not claim real workqueue concurrency or hardware qualification.

Generated-by: LLM
(cherry picked from commit f8650f83f4c2d83bbc440d921b3428bd67f08273)
Signed-off-by: Chris Kearney <chris@kearneymail.com>
(cherry picked from commit 7fcb47d)
A queued pairing pass can observe hotplug_active cleared during freeze
or suspend and exit before it runs. Thaw and resume do not always pair
unused DP resources again. Unlike a true stop, temporary inactivity
must not discard the outstanding request.

Track the request under the domain mutex. Clear it immediately before
the pairing pass, retain it on inactive or failed-runtime-PM exits, and
requeue it from system resume, thaw and runtime resume. True domain stop
discards the request. Resume hooks already own the domain mutex, and the
queued worker still acquires runtime PM before that mutex.

Extend the host fixture with the real freeze/thaw bodies. Cover a pass
that drains while frozen then retries on thaw, and a failed PM resume
that succeeds on a later wake. Eleven ASan/UBSan cases pass; twelve valid
runtime mutants are rejected, including missing pending state, failure
to consume it, and omission of the thaw requeue. This models framework
services and does not claim real suspend or workqueue qualification.

Fixes: f8650f83f4c2 ("thunderbolt: defer DP pairing until DPRX retirement releases paths")
Generated-by: LLM
(cherry picked from commit b224b82dd5dbc62e7d292c9cc34fe732132797bc)
Signed-off-by: Chris Kearney <chris@kearneymail.com>
(cherry picked from commit 3975d42)
A repair queued from resume_noirq or thaw_noirq can run while runtime
PM remains disabled. The domain can still be runtime-suspended, causing
pm_runtime_resume_and_get() to fail with -EACCES. The pending bit survives,
but generic hosts then have no completion-phase replay to service it.

Replay a pending request under the domain mutex from tb_complete(), after
the early-resume phase has enabled runtime PM. On hosts that already
restore DP resources and pair directly in complete, consume the prior
request before that direct pass. A new request raised during the pass
can still be queued afterwards. XDomain rescan keeps its separate scoped
lock and completes before the pairing guard is taken.

Exercise the actual completion body in the existing host fixture, with
modeled PM, queue and paths. Cover noirq PM refusal followed by completion
replay, direct Apple completion acknowledgment, no-request completion,
and XDomain rescan locking. Fifteen ASan/UBSan cases and fifteen runtime
mutants pass. Substituting only the old completion body fails exactly the
three intended completion cases. Critical Thunderbolt W=1 compilation
passes with no C diagnostics. These checks do not qualify real workqueue
concurrency or hardware suspend/resume.

Fixes: b224b82dd5db ("thunderbolt: preserve deferred DP pairing across sleep")
Generated-by: LLM
(cherry picked from commit 3303a5322b90eb0fb191416aa308c96d55c046a0)
Signed-off-by: Chris Kearney <chris@kearneymail.com>
(cherry picked from commit bc1b422)
Adapt the reference-order fixture to the current single-argument DPRX callback and extract the actual tb_dp_tunnel_active implementation. Keep the callback-before-tunnel-put-before-domain-put order explicit, and cover canceled callbacks without pairing or path retirement.

Sixteen actual-body host cases pass with ASan/UBSan and all sixteen runtime mutations are caught. Register this harness in the existing host-test job instead of importing a SiliconForest workflow. The queue, PM and path services remain boundary models; these tests do not qualify kernel concurrency or hardware reconnects.

Generated-by: LLM
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 81399ec)
…P source

Upstream 6a78b76 ("mm/mremap: reset unfaulted VMA page offset for
MREMAP_DONTUNMAP") sets vm_pgoff = vm_start >> PAGE_SHIFT on a source VMA
that MREMAP_DONTUNMAP left unfaulted. That restores the invariant that an
unfaulted anonymous VMA's page offset matches its address.

With user4k the page offset has two parts, the page index and the
sub-page byte offset. do_mmap(), do_brk_flags(), the mmap_region path and
insert_vm_struct() all set both parts from vm_start. Do the same here, via
vma_set_page_offset(), so a source starting on a 4 KiB boundary that is
not 16 KiB aligned gets the right sub-page offset too.

The VMA has no anon_vma and no pages at this point. The offset only
affects later merge eligibility and the index of future anonymous folios.

Generated-by: LLM
(cherry picked from commit 5ec69f61051ba0bad23a5f6fc05e936067976df7)
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 0c4d483)
The maintained display fabric already looks up apple_atc_dp_tunnel_rate_source
and allows external source 0 or 2 for DP IN0. Its fallback can drive only
source 0 when the provider is absent. Supply the existing optional API in ATC
and track the owning source, refusing stale rate/stop requests.

Adapt the provider and focused controls from SiliconForest 13d2aff.
Keep omacom's newer fabric decisions and optional-provider fallback unchanged;
do not restore retired host harnesses. DP IN1 remains unsupported here and
other generations retain their existing qualified clock paths.

Based-on: 13d2aff
Source: https://github.com/iconidentify/siliconforest-linux/commit/13d2affbc4d176b528d0c5ef5b17d639c6daab19
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 13d2aff)
[SiliconForest: adapt the missing provider without replacing current fabric policy.]
Generated-by: LLM
(cherry picked from commit 60b2346)
Carry the previously source-tested dual-stream implementation onto the SiliconForest 7.2.11 kernel. Keep per-stream clock/source ownership and native pipeline admission separate from the ordered M1/M2 fabric policy. Preserve the shared prerequisite clock while either stream remains active, including rate changes and shutdown failures.

Based-on: 8753b9ff351eed4efa9686fece6493891b4f18c8

Generated-by: LLM
(cherry picked from commit ad5a02b8da72502953d032538ef18217f35ec486)

[SiliconForest: retain omacom's newer CRTC narrowing/release behavior and SAFE ownership checks; keep retired harnesses absent. Update the pure fabric clock map alongside the provider and test their parity. Make clock controls standalone and run clock/wiring controls under ASan/UBSan. No forced source, reversed input order or private diagnostics.]
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 873dae4)
… tile

A Thunderbolt DPIN1 request goes through dcp_tb_split_locked() first
while tiled_split is on, the default. With no DPIN0 tunnel route on the
port it returns -ENODEV, to wait for the first half of a tiled display.
On T6030 every Type-C pipeline is an external display processor, which
never takes a tile: once DPIN0 is there, the same function returns
-EOPNOTSUPP. A lone dock display on DPIN1 therefore waits for a DPIN0
that never comes. After the Thunderbolt side's 60 retries (30 s) the
tunnel fails with -ETIMEDOUT, logged as "no display pipeline free".

Before that wait, return -EOPNOTSUPP when every route of the port is an
external processor. dcp->external comes from the DT compatible at probe,
before the routes are registered, so it does not depend on which
services are up. A port with no routes, or with any pipeline that is not
external, keeps the wait, and an existing split is handled first, as
before. Only T6030 sets dcp->external, so other SoCs are unchanged.

Seen on J516S with the DP IN order of a diagnostic build (DPIN1 first),
where a display alone on a TS3 Plus stayed dark. With the production
order a lone display normally gets DPIN0, but the same wait is reached
whenever DPIN0 is unavailable or attaches late.

The host test tools/asahi/tiled-split-tests.py compiles the production
dispatch, split and helper bodies with ASan/UBSan. It covers T6030 in
both DPIN orders, before services are up, with an external owner, with
tiled_split off and for an inactive request; tiled joins, tile-hint
waits, not-yet-ready and mixed or empty route lists on other pipelines;
and the existing split lifecycle. The parent's bodies fail the four
lone-DPIN1 T6030 cases, and each of six mutants of the new gate is
caught. CI runs it with the T6030 display tests.

Generated-by: LLM
(cherry picked from commit 9af410d0034808e37d99a2fea25a2003aafdc94d)
Signed-off-by: Chris Kearney <chris@kearneymail.com>
(cherry picked from commit 5cefcd6)
Allow a separately opted-in native T6030 GPU to use the PMP admitted by
the maintained display gate, without replacing the normal display or PMP
stack. Keep the capability hidden and off by default; GPU Kconfig can
select APPLE_T6030_GPU_PMP_LINK when the display gate is enabled.

Link only the unique enabled T6030 GPU and retain an existing matching
supplier. Reject malformed or unresolved pre-existing T6030 phandles.
The existing T8122 linking path keeps its original behavior.

When the T6030 supplier has no declared native report, select the unique
available T6030 report with its exact supplier phandle and a unique,
enabled reg-7 display request. Use the existing entry-ready consumer,
which owns startup/removal and checks READY plus its request ACK before
the serialized AGX power command. Propagate every readiness failure.
A declared report always takes the existing native25 path, even when it
is malformed; the T8122 missing-report behavior is unchanged.

Adapt the earlier pairing to current omacom instead of restoring the old
broader current14/T8122 helper or relaxing the PR148 readiness contract.
The new lookup validates property shape, duplicate entries and identity.

Based-on: 9333b0728dc4 ("drm/asahi: pair native AGX with the maintained display and PMP stack")
Based-on: 734cd754d3bd ("soc: apple: admit native T6030 GPU through acknowledged PMP report")
Source: https://github.com/iconidentify/siliconforest-linux/commit/9333b0728dc4fa5cfb0271f30314eed5f97d6b9b
Source: https://github.com/iconidentify/siliconforest-linux/commit/734cd754d3bda17647f7dc2cadabe2e588c9ed7d
Generated-by: LLM
(cherry picked from commit dd0670a078b7525c2efc60f38b020bfd61500b35)
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 0c4e44f)
The maintained T6030 report does not own a PMP startup object. The managed-start consumer therefore rejects its bound report with ENODEV. Keep managed-start consumers unchanged and validate the existing passive T6030 report instead.

Pin its platform device and take its device lock without blocking behind supplier removal while the command mutex is held. Require bound driver data for this report, the exact T6030 offset table and no managed startup state. Poll READY together with the display request acknowledgment at bit 7 before allowing the existing serialized power command. Propagate lock contention, absent binding and readiness failures.

The existing display report entry seeds its always-on reg-7 request and polls its acknowledgment; this reader sends no request and starts no firmware. The host controls reproduce the old managed-consumer refusal with no startup object, and exercise the actual new reader with controlled MMIO and locking boundaries. No real teardown-concurrency or hardware qualification is claimed.

Generated-by: LLM
(cherry picked from commit 650a8bc818e4b5470538feaa4da202e22fe53279)
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 5108272)
…diness

Extract the real gate linkage, supplier dispatch, passive readiness reader, existing managed-start consumer and serialized power bridge. Verify default-off parity against the prior source, exact supplier and entry roles, READY plus DISP ACK, report binding and reference/lock cleanup. Keep the existing managed-start consumers byte-identical.

The real passive report case has no managed startup object. The unchanged managed consumer refuses it as expected, while the new reader admits only a ready and acknowledged report. Host MMIO, device binding, OF storage and lock boundaries are modeled. Both config controls pass; 24 runtime mutations are caught, and the prior config-off control passes.

Generated-by: LLM
(cherry picked from commit 669556aad1703caaf82b9feeeb820de7d3f3e403)
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit da0d736)
Update the ATC expectations for the supported second DP input and check both pure clock-policy helpers against the same explicit valid and invalid source/input table. Correct the stale comment describing the public helper as absent.

Generated-by: LLM
(cherry picked from commit d4659833685052360e55c74038528bd9d4cf7430)
Signed-off-by: Chris <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit c6b25d8)
Adapt the missing T8103-generation USB3 reliability work onto the newer PIPE state and fixed-hub lifecycle. Retry a live lock at most ten times, skip legacy host BIST at dispatch, and admit an early role from clean OFF only with lane tunables. Retain incomplete unlock and reconnect obligations until completion or a committed replacement. Keep generic success-only publication, stopped parking, DP ownership and T8122/J700 behavior.

The generation gate also covers the T600x, T8112 and T602x fallback-compatible PHYs. Only J313 hardware qualification is planned; host and emulated tests do not qualify the other boards.

Based-on: AsahiLinux/linux#503 by milijan
Source: AsahiLinux/linux#503
Upstream-commit: 87a2ad1c3428762076ce8e6dcbdd3579b275ec2e
Adapted-from: https://github.com/iconidentify/siliconforest-linux/commit/22b8c3ba2838ee58b600e654504e20b6d9959f22
Adapted-from: https://github.com/iconidentify/siliconforest-linux/commit/37cbda8089c9eae7e0b058aab08d71483afc71c4
Generated-by: LLM
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 191c603)
Compile actual PIPE, role, reset and mux-policy bodies under ASan/UBSan. Check fallback-compatible hardware generation scope from the real DTs and match table. Cover current all-generation success-only state, fixed-hub non-USB3 completion, generic pending retirement, canceled transitions and reset release. Add 40 deliberate runtime regressions and before/after controls to the existing host CI manifest.

The fixture models MMIO polls, BIST, lane configuration, power restoration and mutex boundaries. It makes no timing, electrical, real concurrency or hardware qualification claim.

Source: https://github.com/iconidentify/siliconforest-linux/commit/37cbda8089c9eae7e0b058aab08d71483afc71c4
Generated-by: LLM
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 951b351)
dcp_attributes_replace schedules a connector hotplug notification as well as its dimensions work. The deferred-attributes test used a zeroed work item, triggering a workqueue warning even though its assertions passed. Reuse the catalog observer, initialize and flush its callback, and assert one notification. Production code is unchanged.

Generated-by: LLM
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit ae83957)
Cover both host and device role callbacks after a Type-C mux has already configured the lanes, and an opposite-role callback on the same backend. Check that only later-generation host setup runs BIST and repeated routing does not move the PIPE again.

Generated-by: LLM
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 2790d5f)
…butes

Carry the narrow optional platform hook used by the public native G15
adapter. The default remains false, preserving every existing driver's
bind/unbind interface. G15 opts in because it cannot stop the firmware
safely after startup; retaining DMA objects alone does not make a device
power-domain detach safe.

Based-on: Eryk Wieliczko's native G15 registration work
Source: https://github.com/iconidentify/siliconforest-linux/commit/004d92a5ea8f
Upstream-commit: 004d92a5ea8f
Generated-by: LLM
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 8b375a9)
Complete the G15 generation (T6030, M3 Pro) with what userspace sees,
and build it behind the new DRM_ASAHI_G15 option (default n):

- vm: user VMs, each holding an exclusive TTBAT slot (ASIDs 1..63) for its
  lifetime, with the shared graph's client aliases mapped into every one,
  in VA ranges that belong to the kernel in every VM.
- queue, job, fence: logical queues own no firmware state. Each has one
  DRM scheduler with 16 credits; a SUBMIT is one job with one hardware
  fence, handed to the device-global engine, and fences signal in queue
  order with the VM status latched first. QUEUE_DESTROY drains the queue.
- command, gate: SUBMIT parsing and validation, in order: the stream's
  structure, the timestamp handles, the header barriers and EXACT_PRIOR
  ordinals (the semantics of the G17 rules; the engine's total order
  satisfies every valid one), every command's mapped spans with the right
  access, and the CDM/VDM stream gates that admit only known records
  (g15_stream_gate).
- timestamp: timestamp buffers mapped into the firmware's 64 MiB arena in
  the host window, where the firmware writes nanoseconds directly.
- params: GET_PARAMS (feature word 0x3e, QUEUE_LIMITS, identity), VM_BIND
  batches of at most 1 << 20 operations. SOFT_FAULTS, FEW_PRIMITIVES and
  RENDER_RAY_QUERY are never advertised; FRAGMENT_BARRIERS only with
  g15_early_tiling.
- mod: the generation's GPU, its shared state and device lock, and its
  platform driver for apple,agx-t6030. The driver is registered
  separately from the other generations and has no module alias: the M3
  must start its GPU only after the native display is up, so the firmware
  boots when userspace loads the module afterwards. It suppresses its
  bind attributes, and a started session keeps the module and everything
  the firmware can reach until reboot.

The module parameters g15_* carry the few tunables that stay tunable
(load time only): deadlines, the repoll and completion intervals, the
firmware idle standby time and confidence, recovery, the stream gates
and early tiling.

Tested on the J514S with Mesa's asahi Vulkan and Gallium drivers: a
Minecraft Vulkan replay runs at about 161 FPS with identical frames,
the deqp-vk memory model, compute, render and submit subsets show no
failures, and induced compute and render hangs are ended and recovered
without a firmware crash.

Signed-off-by: Eryk Wieliczko <eryk@wieliczko.ninja>
(cherry picked from commit 13a93ec)
[port to integration/aurora: the generation is a backend of the shared
platform driver instead of a second platform driver without module
alias: asahi.m3_backend gains the value g15, and auto starts it on
the validated J514S/J516S boards when CONFIG_DRM_ASAHI_G15 is built
(asahi.m3_backend=runtime keeps the M3 runtime; without the option
auto keeps starting the runtime); AsahiDriver::probe_g15() keeps the
device bound with no DRM device when the probe fails after the
firmware was touched; drm_gpu::Backend::G15 adapts gpu::Gpu to the
DrmGpu file layer, and file.rs keeps the M3 runtime's per-SoC feature
rules off a G15 device; the command stream check requires the
ts_frag_end_copies/ts_end_copies arrays of this tree's UAPI layout to
be empty, as G17P does, since G15 implements no timestamp copies; the
crate root is renamed asahi_core.rs so that g15/glue.o can be linked
into asahi.o; the Kconfig text follows]
Assisted-by: LLM
Signed-off-by: Diljit Singh <hey@djdev.me>

[Maintained-driver port: G15 subtree snapshot including the preceding firmware/engine/recovery commits a8b817e,39e7cf0bfdaa,01812cc4894f; no shared APIs or display/PMP policy imported.]
Source: omacom/linux-aurora@04795f0
Upstream-commit: 04795f0
Generated-by: LLM

(cherry picked from commit ead6240)
The T6031 GPU is the same firmware generation as the T6030's (RTKit 2419,
the same initdata graph and canonical VAs) on a different SoC: four
clusters of ten core slots, so the enabled-core mask is two words
(+0xe01500 and +0xe01504), identity words 0x07041100/0x0021040a, revision
0x12, and the GPU is powered by its power domain alone (there is no PMP
vote on this SoC). Its GPU node is in the kernel device tree, filled by
the boot loader (the UAT regions, the loaded firmware segments as fw-text
and fw-data with their VAs, and the operating points), so the regions do
not come from an ADT export.

Make the SoC-specific parts of the G15 driver a property of the
configuration row instead of module constants: the machine check and the
PMP vote (Platform), the source of the regions (the ADT export or the GPU
node), the initdata placement that differs between firmware builds
(Layout: root version, HardwareData VA, size, cached prefix and fourth
view, the IOMapping table), the board images (Board) and the compute
register values that scale with the cluster count (ComputeRegs). The
identity read fills one core mask per cluster, up to four, and GET_PARAMS
reports as many as the SoC has.

Add the T6031 row matched by apple,agx-t6031. It carries no firmware pin
and no board data yet, so admission prints the measured TEXT identity and
stops before anything firmware-visible. The T6030 row keeps every value it
had; its behaviour is unchanged.

Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
(cherry picked from commit 7dfc3c2)
[port to integration/aurora: the row is selected by the shared platform
driver (asahi.m3_backend=g15, or auto on the J516C when the generation
is built; every other value and board keeps the T6031 runtime
selection) instead of a second OF match table; both SoCs use the GPU
node's single unnamed mailbox; the T6030 row keeps this tree's PMP
vote through apple_pmp_set_device_power; the T6031 node is
integration's static t6031-gpu.dtsi, which the boot loader fills with
the same region and segment names this row reads]
Assisted-by: LLM
Signed-off-by: Diljit Singh <hey@djdev.me>

[Maintained-driver port: G15 subtree only; shared layers and registration adapted separately.]
Source: omacom/linux-aurora@d8422e0
Upstream-commit: d8422e0
Generated-by: LLM

(cherry picked from commit fa787b7)
The GPU firmware TEXT a J516C's macOS 14.7 boot chain leaves loaded
(iBoot-10151.140.19.700.2, RTKit-2419.140.12.release): TEXT 0x64000 and
DATA 0x140000 bytes, the GKTS entropy marker at 0x5cf28, SHA-256 of TEXT
with the 8 entropy bytes zeroed
c26ec89c1150eb6549cf602e012d0c5f49eb756e896d6bb8342cb2c5d98b332c,
measured on the loaded segment of a J516C.

The same machine started through a macOS 14.8.x chain carries a different
stub whose full digest has not been recorded. For that case, and for the
next build of either stub, add g15_accept_text_prefix: an unpinned build
whose digest starts with the given 8 bytes is admitted for that boot with
a warning that prints its full identity, so it can be pinned by the next
kernel without a second measurement boot. Off by default.

Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
(cherry picked from commit 9609d14)
[port to integration/aurora: the module parameter is added to the
renamed crate root asahi_core.rs]
Assisted-by: LLM
Signed-off-by: Diljit Singh <hey@djdev.me>

[Maintained-driver port: G15 subtree only; shared layers and registration adapted separately.]
Source: omacom/linux-aurora@7c28576
Upstream-commit: 7c28576
Generated-by: LLM

(cherry picked from commit 9cb33dc)
The T6030 board templates do not fit the T6031: its HardwareData record is
0xb480 bytes (the fourth HardwareDataB view at +0xb400), its root version
word is 0x0c08e21e84820490, its IOMapping table has 17 slots at the T6031
register blocks (Fender at sgx+0xd00000 with a 0x144000 window, eight
0xd8000 memory-cache instances, the clock generator at sgx+0xe1c000, the
ANE doorbell at 0x3c945c000, ...), it has four per-cluster voltage tables,
and hundreds of its words differ from the two-cluster image. Everything
here was read on a J516C: the device tree the boot loader hands over, the
SGX registers and that machine's initdata.

Give the T6031 row its layout and IO table (VAs packed from
0xfffffc2068000000 as the T6030 table is) and take its three board images
from one firmware file, asahi/t6031-j516c-board.bin, pinned by SHA-256 and
built into the kernel with CONFIG_EXTRA_FIRMWARE: the images that
machine's firmware accepted, as the earlier J516C driver uploaded them.
The build checks the file's IOMapping records against the layout, then
writes what it owns: the TTBAT address, the IOMapping VAs, the timestamp
arena, the creation timestamp and the idle policy. The HardwareData
object is placed 16-byte aligned (0xfffffc20406fb580) and mapped
ASC-cached as a whole: the firmware's MTR alarm handler does a 64-bit
atomic in HardwareDataA, which faulted at the T6030 placement on T8122.

The T6030 path (templates, DVFS from the ADT, the S8 request words) is
unchanged.

Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
(cherry picked from commit 04e10f0)
[port to integration/aurora: applied unchanged]
Assisted-by: LLM
Signed-off-by: Diljit Singh <hey@djdev.me>

[Maintained-driver port: G15 subtree only; shared layers and registration adapted separately.]
Source: omacom/linux-aurora@0c98b7e
Upstream-commit: 0c98b7e
Generated-by: LLM

(cherry picked from commit 0fb95eb)
The compute work image carries four cluster-sized register values that
the two-cluster G15S values get wrong on the four-cluster G15C, where
they fault the first job: the saved-state pointers into the preemption
buffer at +0x2980 instead of +0x1480 (0xd80 plus 0x700 per cluster), UMA
PTC (0xa599) 0x6000400020 instead of 0x13200400020, DUPM (0xd411)
0x3c000000140 instead of 0x200000001 (32 N | 96 N << 32 for N = 10 cores
per cluster) and 0x1a0e9 = 0 instead of 8. The J516C's own driver also
encodes a queue's first command with the saved-state pointers and the
0x12091/0x101d9 words zero; the G15C commands here are all encoded that
way, which is how compute work first completed on a J516C.

The values were read from 38 compute commands on a J516C and verified
by the register-fault analysis of the earlier J516C driver's boots. The
T6030 values are unchanged. The render (TA/FS) values for the G15C are
not known yet and stay the G15S ones.

Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
(cherry picked from commit 9174c1e)
[port to integration/aurora: applied unchanged]
Assisted-by: LLM
Signed-off-by: Diljit Singh <hey@djdev.me>

[Maintained-driver port: G15 subtree only; shared layers and registration adapted separately.]
Source: omacom/linux-aurora@d3283ae
Upstream-commit: d3283ae
Generated-by: LLM

(cherry picked from commit fdebd36)
chriskearney and others added 12 commits October 23, 2026 02:31
Allocating an orphan with KBox::new consumed the live session before the
allocation could fail. Allocate uninitialized storage first and explicitly
retain the still-owned session if that allocation fails. Allocate the VM
registry inside the guarded backend construction, so its failure takes the
same orphan path as the other post-READY allocations.

Make the UAT Arc-clone accessor infallible and use c_char for the host
handoff fixture. Register drop-count controls using the actual retention,
backend and KBox ownership bodies: 23 cases retain every live owner and
backing buffer; both original P1 bodies compile and fail at runtime after
dropping five owners. The normal control passes before and after them.

Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
Generated-by: LLM
(cherry picked from commit caafb8e)
ASoC unmutes active playback DAIs at D2 before publishing D0. MCA takes
SNDRV_PCM_INFO_RESUME from ADMAC, so an active PCM can then resume through
TRIGGER_RESUME without another prepare. Discarding the D2 unmute therefore
leaves the headphone output muted until the stream is restarted.

Remove the speculative card-power-state gate added to CS42L84. No missing-
BCLK I2C hang has been established on this codec. Preserve the bounded PLL
lock check and its oscillator rollback; D0 is not evidence that BCLK runs.
The direct-BCLK path returns to its behavior before the gate was added.

Replace tests that assumed a second unmute after resume with a running
stream, suspend mute, single D2 unmute and D0 notification sequence. Cover
PLL and direct-BCLK configurations and refusal when the PLL cannot lock at
D2. UML KUnit passes all 17 cases; restoring the old gate fails six of
them. No hardware suspend/resume qualification is claimed.

Fixes: 4b69aec ("ASoC: cs42l84: keep the codec on the oscillator until BCLK runs")
Generated-by: LLM
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 46420c4)
Use one checked layout for atomic admission and DCP surface construction.
Bound tile metadata, wire fields, offsets and GEM extents using the same
geometry that is programmed. Refuse fractional-bpp Interchange formats
(P030/P230) until their compressed packing is established; keep packed
linear formats and existing integer-bpp layouts.

The format callback also honors the plane's modifier list, so linear-only
planes cannot acquire Interchange through DRM's callback dispatch. Use the
actual framebuffer qualification required by the DMA helper.

Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
Generated-by: LLM
(cherry picked from commit 8c26443)
Compile the actual plane layout, atomic check, surface update and DRM
format-dispatch bodies with the exact DMA-helper prototype. Cover wire
bounds, undersized objects, fractional Interchange refusal, valid packed
linear geometry and linear-only plane restrictions.

Register the standalone suite in the CI host manifest. Twenty controls
pass and ten runtime mutants fail with valid before/after controls. An
old-callback control reproduces the modifier-list bypass. These host
checks do not qualify hardware rendering.

Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
Generated-by: LLM
(cherry picked from commit b0effd1)
ASoC resumes playback unmute at D2, before MCA may supply SCLK. Keep the
observed base-M1 clock guard, but do not let PCM RESUME bypass the prepare
that supplies the host clock and unmutes again. Clear only playback's
SNDRV_PCM_INFO_RESUME in DAI prepare, after hw_params assigns runtime info.
ALSA preflight then refuses RESUME before either DPCM side is triggered;
userspace recovers through prepare. Capture and other flags are unchanged.

Admit both parts through one immutable probe-time flag: base-M1 OF root,
CS42L42/83 OF codec and non-SoundWire transport. That macaudio jack path
permits one FE per BE, whose runtime is shared. This is not a generic
shared-BE fix: other hosts, J700 and SoundWire retain their previous D2
unmute and resume capability. No machine-wide speaker downgrade is added.

Exercise real ALSA RESUME/PREPARE ioctls and ASoC DAI dispatch, linked
capture-first preflight, prepare/unmute recovery and a real-OF admission
matrix. Both codec suites pass 52 UML KUnit cases without skips. Original
policy and deliberate guard, capability and admission mutants fail with
matched controls. SoundWire compiles. Hardware suspend/resume remains
unqualified.

Fixes: 30f3203 ("ASoC: cs42l42: keep the codec on the oscillator until SCLK runs")
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
Generated-by: LLM
(cherry picked from commit 99e2571)
The T8103 PHY compatible is also a fallback on M1 Pro/Max and M2. Admit
only an apple,t8103 machine with the T8103 hardware row for the added
live handoff retries, host-BIST bypass and early USB3 setup. Keep the
existing generation-specific register and clock programming unchanged.

An early role callback may configure USB3 only after Type-C requested
plain USB3. Preserve the existing retry obligation when the role arrives
before that request, or lane configuration fails, so the later mux update
can finish the backend route for host and device roles. A committed
non-USB3 mode clears that obligation, including same-mode updates.

Exercise actual production bodies in 36 host controls and 49 runtime
mutants, including both role/mux orders, lane/backend failures and M1/M2
fallback chips. All controls pass and every mutant is detected. Add a
real-OF KUnit case for the machine/hardware admission matrix; all 36 ATC
KUnit cases pass in arm64 QEMU. Update the DCP host fixtures for the
narrowed admission; all 56 controls pass.

No M2 or Pro/Max USB3 hardware qualification is claimed.

Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
Generated-by: LLM
(cherry picked from commit aac315d)
The AV endpoint receive queue and the audio owner's system workqueue
have separate lifetimes. Flushing endpoint RX does not wait for running
service-start or Terminate work embedded in the devm audio owner.

Stop the native endpoint initializer before looking up its owner during
unbind, including the dead-session path, and during permanent teardown.
Refuse new owner work and synchronously disable the initialized works
while endpoint RX can still complete their RPCs. Track one owner disable
so successful rebind enables each work once; failed initialization stays
disarmed.

Capture the exact owner and endpoint in an owner-associated devres action
registered after the AFK context action and before endpoint start. Drain
that owner before quiescing its captured endpoint, then clear publications
only when their owner still matches. Handle absent and failed endpoints,
and run the same owner-only cleanup on initialization failure without
waiting on the native initializer from inside itself. Preserve the original
initialization errno and guard ordinary shutdown against error pointers.

The ARM64 QEMU KUnit control passes all 26 AV tests with KASAN and lockdep.
Actual devres group release, running and pending owner work, producer and
owner rebind balance, missing/error endpoints, the action-reset registrar
failure boundary, and successor publication are covered. Eight production-body
mutants compile and fail runtime assertions; the restored control passes
without guest diagnostics. Update the J700 readiness host fixture for the
new no-owner cleanup boundary; native audio remains forbidden there.
Hardware teardown is not qualified here.

Generated-by: LLM
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit 9904393)
The stale-temperature test unlinks the fake SMC key list before creating
its replacement FIFO. If the sampler opens the path between those calls,
it correctly reports a missing key list instead of a stale sample. CI
then fails the diagnostic assertion despite stopping the load safely.

Create the FIFO at a sibling path and rename it over the key list. Reads
already in flight can complete; later opens block on the FIFO. Keep the
separate missing-key test and all load-stop and restoration assertions.
No driver or installed tool changes.

Widening FIFO creation by 250 ms reproduces the exact CI assertion on the
parent and passes with this change.

Generated-by: LLM
Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
(cherry picked from commit d60121f)
Linux 7.3 passes the tunnel's callback data to the DP tunnel callback,
and tb_tunnel_alloc_dp() gives tb_dp_tunnel_active() the domain as that
data. Match the extracted DPRX completion tail against the two-argument
call, and give the host model's tunnel the same callback shape and data.

The test checks the same release order as before: the callback runs,
then the tunnel and domain references are dropped. All 16 cases pass
and all 16 mutants are caught.
The PMP report driver in this tree can hold power state requests in
memory until the PMP runs, for SoCs whose offsets set defer_requests.
The extracted probe and set_state bodies therefore use the request
shadow, the deferral flag, a delayed work item and
apple_pmp_report_running().

Give the host model these fields and extract apple_pmp_report_running()
with the other production bodies. T6030 does not defer requests, so
the delayed work stubs fail the test if they are ever reached. All 18
graph cases pass and every mutant is caught.
The native G15 backend is built only with DRM_ASAHI_G15, which is off by
default, so the shipped configuration does not compile it. Port it to
the 7.3 interfaces the rest of the driver already uses:

- module parameters: ModuleParam::value() returns the value itself;
  drop the dereferences.
- the scheduler job's owner is
  kernel::module::this_module::<crate::LocalModule>(), as for G17.
- IdArray::new() takes a reference to each entry's info, so the OF
  match table holds &&Config.
- of_device_table!() no longer takes a module table name. The T6030
  autoload table carries no ID info and uses its @none form.
- apple_rtkit_ops has the optional syslog_is_debug policy; G15 keeps
  the default log level.

The parameter-buffer growth host test models module parameters the same
way, by value.

No functional change. With DRM_ASAHI_G15=y the asahi module builds and
links on 7.3.
This tree refuses charge control thresholds outside 0..100 with -EINVAL
before any SMC key is read or written (3c82528, "power: supply:
macsmc-power: propagate threshold read errors"). The end threshold test
expected -1 to clamp to the minimum and 150 to clear the limit, as on a
tree without that check.

Move -1, 101 and 150 to a refusal check: each returns -EINVAL, leaves
CHLS as it was and makes no SMC access. The in-range cases are
unchanged. All 11 macsmc-power-charge cases pass.
Keep the original sync commits intact and reconcile the native G15
backend with the current G16/G17 registration, memory and timestamp APIs.
Preserve SoC-specific PHY and power-domain ownership rules, combine the
host fixtures, and describe the T6030 audio and tunnel routes in bindings.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

RyanTheTide commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

The public head is d1468a5f9a50a23cf741f56d83e6690441b90482. The follow-up commit only removes the unused crate::module_parameters import from drivers/gpu/drm/asahi/gpu.rs. All earlier sync commits and their metadata are retained.

Qualification commit b2d24f975841709de34a1ea4ecb593c406c72cdd combines it with integration/aurora at 653c489a8347b8004d2895b4da775f46e334776b and #394 at 8800a5887f7f85c28bfbfdfb42cfeb2f4fcff367. Its tree differs from the previous qualification tree only by the deleted import.

Both full LLVM WERROR recipes passed with the same configs and toolchain. Fedora completed after a preserved storage-guard interruption with unchanged inputs. Fresh arm64 QEMU KUnit passed 779 tests with one suite-defined skip, and asahi-g15 passed 61 tests with two ignored.

M2 and then M1 Pro passed their candidate one-shots against 73x. Native GPU readback, codec binding, USB-C and Apple USB4 controllers, Wi-Fi, speaker protection and enforcing SELinux matched the baselines, with zero warning, BUG, SError, DART-fault or AOP-failure markers. Both are back on 73x with the test kernels, entries and fallback timers removed. Saved defaults, boot.bin and the 7.1 DTB set were preserved.

Ready for merge at this head and qualification commit.

One existing metadata note, the four original 7.3 adaptation commits e085a95c50, 48e11855fc, fc13d05b1d and 18ba468d82 lack Signed-off-by trailers. Their metadata is unchanged.

RyanTheTide and others added 4 commits October 25, 2026 18:15
Model the pinned KBox pointer used by the shared G16 registration and include its actual conditional alias and helper. Run the G15-only and combined G15/G16 configurations, including late G16 registration failure and an activation-order mutation.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Keep the existing Rust 1.93.1 default while allowing an explicit host
compiler for the PB growth and stats drain runners. Record the compiler
version. Allow the retention test to consume the pinned public pre-fix
source when that historical file is unavailable locally, preserving its
ownership-drop controls.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Declare property-presence lookup and the rejected T6030 readiness probe
in the M4 supplier fixture. Keep declared-but-invalid report links on
the report path, and check that absent reports cannot admit either of
the fixture's non-T6030 suppliers through the legacy fallback.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The soft-fault check uses the fully qualified module path, so this
import is unused and fails builds with warnings treated as errors.

Signed-off-by: Ryan <ryan@murraytraining.com.au>
Assisted-by: LLM
@RyanTheTide
RyanTheTide merged commit a1b269f into integration/aurora Oct 25, 2026
RyanTheTide added a commit to jgoyvaerts/linux that referenced this pull request Oct 25, 2026
Resolve the Makefile conflict with aurora-silicon#395: keep the shared fwid.o and add
the G15 glue object. G15 has its own identity and SHA-256 helper, so
the move of the G16 identity into fwid does not touch it.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
RyanTheTide added a commit that referenced this pull request Oct 25, 2026
Resolve the conflict with #395 in apple_drm_uninit(): withdraw the T6030
display publication first, then keep the T6041 rule that an aborted
takeover leaves its DCPs running.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
RyanTheTide added a commit that referenced this pull request Oct 25, 2026
Include the newly qualified #395 omacom #177 sync on Linux 7.3 before
running consolidation gates. Keep the newer complete DWC3 host fixture
instead of duplicating its role fields and runtime-PM helpers.

Retain the WIP-only files and non-conflicting changes from the earlier
normal merge. No history is rebased or force-updated.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Assisted-by: LLM
@RyanTheTide
RyanTheTide deleted the aurora-wip-sync-177 branch November 7, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants