Repository navigation
Integrate reviewed G15, T6030 dock and platform fixes on the 7.2.11 update - #177
Conversation
[ryan: adapted to 7.2.10 — include the GPU description between the carried pmgr and display descriptions, in the source order; the nodes stay disabled] (cherry picked from commit e1b02f34843913828e45d47074890777f051efd6 in iconidentify/m3-linux main) Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> Claude-Session: https://claude.ai/code/session_01FwdG63dRaMrRbYrUBkSa1i (cherry picked from commit 7b1603a) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
(cherry picked from commit e0958e7f3dd02ea9ff6e8f3ac6579d4a04860279 in iconidentify/m3-linux air/t8122-dynamic-gpu-regions) Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> Claude-Session: https://claude.ai/code/session_01FwdG63dRaMrRbYrUBkSa1i (cherry picked from commit f18e6a5) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Give the T8122 GPU node what a boot loader needs to hand the GPU over the way it does on the T6030, and nothing that needs a value it has not read from this machine: - a gpu alias, through which m1n1 finds the node; - an OPP table whose single placeholder the boot loader replaces with one OPP per performance state (one opp-microvolt cell for the single GPU cluster); every placeholder value is zero; - zero apple,firmware-abi/version/compat placeholders, which stay zero until the loaded GPU firmware is identified; - post-init-providers for ps_gfx, so a GPU that never probes does not hold back the gfx power domain's sync_state(), as on the T6030; - the GPU mailbox as apple,t8122-agx-asc-mailbox, without the v4 fallback, so a kernel without M3 GPU support leaves it unbound even when the boot loader has enabled it. The power-management coefficients, the leakage coefficients and the per-state power are this machine's, so the boot loader adds them from its ADT. drm/asahi refuses a T8122 GPU node without them. The GPU and its mailbox stay disabled, so a normal boot sees no change. Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> Claude-Session: https://claude.ai/code/session_01FwdG63dRaMrRbYrUBkSa1i (cherry picked from commit fcd0df9) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Select the exact 26.6.2 DCP ABI with an explicit profile property and keep the display, PIODMA and native PMP topology disabled until the boot handoff is validated. Supply each Mac's PMP tunables through the boot loader. Use trackpad power method 2 only for this firmware variant. Keep the shared J613 device tree and GPU resource windows unchanged. Add the native GPU mailbox fallback and PMP supplier link only to the 25G83 variant, with the GPU and its mailbox disabled until handoff. Add host controls for the production profile, swap and PMP bridge helpers and the compiled profile device trees. [ryan: adapted to 7.2.10 — carry only the GPU and AGX mailbox profile overrides that the earlier DT split left out while their T8122 GPU suppliers were held; the profile nodes stay disabled; other parts are already carried or stay with their owners] Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> (cherry picked from commit 12a6137) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Publish the three GPU memory regions replaced by the bootloader so its six-region firmware handoff has no extra pagetables-l2 entry. Limit the exclusive ASC register resource to 16 KiB so it does not overlap the mailbox resource. The current14 tree is unchanged. Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> (cherry picked from commit ce20bb2) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The reservation parser now consumes every iommu-addresses tuple and warns when a tuple's phandle names no node. m1n1 fills in the display reservations with fdt_get_phandle() of the DCP, display and PIODMA nodes, which is 0 for a node that nothing references. On J700 the external DCP and its PIODMA child carry no phandle, so all five of its reserved-memory nodes start with phandle 0, and every pass over its reservations logs "Invalid iommu-addresses phandle 0x0": twelve lines at boot on the same Stage-2 device tree that 7.2.10 boots quietly. Phandle 0 is not a valid phandle, so such a tuple can never describe this device, and its cell count cannot be known without its owner. The parser already stops at an unknown owner; keep doing that, but report a zero phandle at debug level only. Other unknown phandles still warn. No reservation changes. The parser before the tuple walk skipped these tuples too, and the T8140 external DCP keeps running on the DART state it inherits from the boot loader. The device tree and loader sides, which give the external DCP a real phandle, are handled separately. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The DP AUX poll is queued on system_wq and the deferred CIO restart after sleep on system_unbound_wq. Both queues are deprecated in 7.2: the first piece of work queued on either logs a warning once per boot, which hides any later user. Neither worker needs the CPU that queued it. The poll reads adapter state under the domain lock, and the restart already runs from a worker so that probing children cannot deadlock the notifier chain. Queue both on system_dfl_wq. For the restart this is the same unbound queue under its current name. Keep the delays, cancellation and teardown unchanged. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The timeout handler hands controller recovery to a worker on system_unbound_wq, which is deprecated in 7.2: the first item queued on it logs a warning once per boot and hides any later user. Queue it on system_dfl_wq, the same unbound queue under its current name. Recovery ownership, cancellation and teardown are unchanged. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The delayed release of the ANE frequency boost is queued on system_wq, which is deprecated in 7.2: the first item queued on it logs a warning once per boot and hides any later user. The release drops the frequency requests of every policy under the boost lock and does not need the CPU that queued it. Queue it on system_dfl_wq. Keep the idle delay, re-arming and teardown unchanged. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The admission retry of the PIODMA bootstrap guard is queued on system_unbound_wq, which is deprecated in 7.2: the first item queued on it logs a warning once per boot and hides any later user. Queue it on system_dfl_wq, the same unbound queue under its current name. The retry delay and the host reference it publishes are unchanged. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The user-subpage pool, owner and retired-mapping frees, the BPF pin release and the VFIO ioctl test worker are queued on system_unbound_wq, which is deprecated in 7.2: the first item queued on it logs a warning once per boot and hides any later user. Queue them on system_dfl_wq, the same unbound queue under its current name. Ordering, references and teardown are unchanged. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…command encoders) Carry only the M3 TA and 3D command encoders, m3_tiler_command.rs and m3_fragment_command.rs, and the render geometry and state helpers they use, agx_render.rs and agx_render_state.rs. The encoders were held out of the earlier M3-only splits because they share files with the held G15G register-list change; they are carried now so that it can follow. The backend is compile-only: nothing constructs a command, and no G13/G14/G17 path or UAPI is changed. [ryan: adapted to 7.2.10 — minimal, pending DJ review: isolate these modules under m3 (crate:: becomes super::). The encoders are as of the second source commit below, which also holds their origin in the first, without the depth-compression bindings that Eryk Wieliczko added before it; those are carried next under their own authorship. The state helpers are as of the third source commit. No runtime integration is claimed by this split.] Source: commit bbefc95 ("drm/asahi: add the M3 (G15S) GPU runtime") Source: commit 91fd07a ("drm/asahi: excise unbound G16 and G17 runtimes") Source: commit 65c2a80 ("drm/asahi: remove unused backend helpers and narrow layout visibility") Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Populate native ZLS metadata registers and spill mirrors from the existing GPUVM-validated UAPI. Retain rejection of stencil compression and compressed multisample/layered jobs. Native 26A428 register snapshots identify the field locations; the opt-in single-layer D32 Minecraft replay renders pixel-identical frames on M3. All nine serializer tests pass, including the sixteen unchanged whole-command fixtures. Broader Mesa compression qualification remains separate. [ryan: adapted to 7.2.10 — carry only the 3D command encoder hunk, now under m3/; the GPUVM/UAPI side of these bindings stays with the M3 runtime port] (cherry picked from commit a8b0d26998992c1db4f3bb8092c7bd405fbf2c1d on Eryk Wieliczko's eryk_m3_gpu branch; driver changes only, lab tooling omitted) (cherry picked from commit 217822c) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
modpost warns that scan_timeout_test.o has no MODULE_DESCRIPTION() when the brcmfmac KUnit tests are built as a module. Add one. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
modpost warns that dcp-fabric-test.o has no MODULE_DESCRIPTION() when the fabric tests are built as a module. Describe it like the other DCP test modules. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
[ryan: adapted to 7.2.10 — the M3 probe arm refuses before resources; replace its pending-provenance T8122 refusal with this read-only identity gate in m3::refuse_probe() and keep -ENODEV; Core gains its 7.2 lifetime; of_node_put() is called only with CONFIG_OF_DYNAMIC, as in kernel::of::Node] (cherry picked from commit 5b89559a4f424bf2ce5dcdd71ea572e86e770ec0 in iconidentify/m3-linux air/t8122-g15g-admission) [Adapted to aurora-linux: driver.rs has no T8140 path here, so the T8122 gate is the first check in refuse_agx3_probe().] Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> Claude-Session: https://claude.ai/code/session_01FwdG63dRaMrRbYrUBkSa1i (cherry picked from commit 8b20dce) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Take register windows, IO mappings, UAT geometry, runtime HwDataB words and optional userspace features from the admitted SoC. Preserve the T6030 mapping tables and configuration words. Reserved UAT tables require the registered 42-bit hardware configuration. Describe the T8122 C0 firmware layout and check its OPP table using voltage-sorted primary and secondary frequencies. Leave missing T8122 hardware, IO and setup values unset so startup remains disabled. Require the SMC die thermal zone for every T8122 board without widening board admission. Validate IO ownership, range bounds and firmware entropy-tag bounds before mutation. Add host tests for admission, OPP shape, IO ownership, firmware layouts and thermal-zone requirements. [ryan: adapted to 7.2.10 — the rest of this change is carried as an M3-only split; carry the held-file remainder: the operating-point shape check of t8122_admission.rs, the compile-only subset of the per-SoC table (SoC names and HwDataB words, with G15RuntimeHwDataB kept M3-local instead of in the shared initdata.rs), and the host-test entry limited to the carried modules] Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> (cherry picked from commit 88e5636) (cherry picked from commit b2a9b8f) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The G15G firmware takes G15S's compute register list without its last two entries (0xa599, 0xd411): the same 20 registers in the same order, the same 12-byte entries at +0x20, count and length at +0x728 and the same control word. Add a per-SoC RegisterSet and send the G15G list on T8122. The T6030 list is unchanged. [ryan: adapted to 7.2.10 — carry the compute command register lists and the per-SoC register set into the compile-only m3 modules; the Compute job and runtime call sites (m3_compute.rs, m3_runtime.rs) stay with the M3 runtime port] (cherry picked from commit 42f5431f326dd25ccb4185593f2dc934386ab077) Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> Claude-Session: https://claude.ai/code/session_01GWRhUgND1qhew6aEd6vsj8 (cherry picked from commit 84e3461) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The G15G firmware takes G15S's TA register list without 14 of its registers and the 3D list without 4; the rest keep the G15S order and entry layout, and the TA/3D command and microsequence layouts are G15S's. Encode the G15G lists on T8122, from the SoC's RegisterSet. The T6030 lists are unchanged. [ryan: adapted to 7.2.10 — carry the TA and 3D command register lists into the compile-only m3 encoders; the Render job and runtime call sites (m3_render.rs, m3_runtime.rs) stay with the M3 runtime port] (cherry picked from commit a1ba5a7da2abcb516987ebb9cafc7f957abb66b8) Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> Claude-Session: https://claude.ai/code/session_01GWRhUgND1qhew6aEd6vsj8 (cherry picked from commit 8231fa3) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The G15G firmware takes T6030's runtime HwDataB configuration words and unit masks except for four words: +0xa2c is 2 (the chip revision's major number), +0xb20 is 0x0a (ten core slots, where T6030 has twenty), +0x17b8 is 4 and +0x1818 is 0xffffffff. Give the T8122 table those words, and the T6030 unit masks, 0x700000003 and 0x7. The T8122 start experiment now uses the table's words. Its unit-mask defaults become the table's masks; before, the knobs refused mask A's second bit, which the G15G firmware runs with. The T6030 words are unchanged. [ryan: adapted to 7.2.10 — carry the T8122 HwDataB words into the compile-only per-SoC table; the start experiment and its unit-mask defaults (t8122_start.rs, t8122_knobs.rs) stay with the M3 runtime port and still need this table change] (cherry picked from commit 562b15fac35243fc15b3d66e3cfc36b1b47dd9af) Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> Claude-Session: https://claude.ai/code/session_01GWRhUgND1qhew6aEd6vsj8 (cherry picked from commit 330a560) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
A word-by-word comparison of the T8122 InitData that the runtime builds from a J613's device tree against a J613's working InitData shows the same voltage, frequency, IO-mapping and controller words, and a short list of configuration words where the G15G firmware runs with other values than the shared builder writes: - HwDataB +0xa30 and +0xa34: 0 and 4 (the builder writes 1 and 0); - HwDataB +0x17e0..+0x1860: the G15G flag words (the builder writes the T6030 ones, 1 at +0x17e8, +0x1804, +0x1814 and +0x1860 and all-ones at +0x1848); - HwDataA +0x11e0, a shader-engine controller word: 30 (40); - HwDataA +0x1290: 125, and HwDataA +0x424c: 24000000, the 24 MHz reference clock (both 0); - Globals +0x9bc: the CDM backoff timeout 4 with the next three bytes 0 (the builder writes a 1 after it); - the Globals smart idle-off curve and count, which the T8122 hardware configuration left empty: the T6030 values. Give the SoC table per-object word lists and the T8122 values. The words are SoC configuration, not per-Mac values. T6030 has empty lists and its hardware configuration is unchanged. [ryan: adapted to 7.2.10 — carry the T8122 HwData and Globals word lists into the compile-only per-SoC table; the InitData builder writes (m3_adt_config.rs) and the smart idle-off curve of the T8122 hardware configuration (hw/t8122.rs) stay with the M3 runtime port] Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> Claude-Session: https://claude.ai/code/session_01GWRhUgND1qhew6aEd6vsj8 (cherry picked from commit a0fe58a) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
[ryan: adapted to 7.2.10 — the rest of this change is carried as an M3-only split; carry its held-file remainder, the named flush-stamp offsets of the TA and 3D command encoders] Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> (cherry picked from commit 179d09e) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Write the tiler sequence length at 0x778 and the fragment sequence length at 0x1c. Share those offsets with the command encoders so optional measurement packets preserve both command pointers and all other descriptor fields. [ryan: adapted to 7.2.10 — the rest of this change is carried as an M3-only split; carry its held-file remainder, the stage-specific sequence-length offsets of the TA and 3D command encoders] Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> (cherry picked from commit 6ea5927) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
On an M3 MacBook Air (T8122) with the G15 14.8.3 GPU firmware, the GPU start stalls at the first device control: the 0x13 acknowledgement times out and the probe fails with -110. It did so in every boot reported in #26. The start succeeds when the 20-word block at HwDataA +0x418c..+0x41db holds these little-endian u32 values, with nothing else changed: 1, 500, 5, 12500 x5, 3000 x3, 12500 x8, 1 The values are not in the device tree. The range is covered by the G13-era core_leak_coef[4..8], sram_leak_coef and aux_leak_coef fields, which the G15 builder leaves at zero on T8122; the values are integers, not floats. Compile-time asserts tie the block to exactly that range. Write the block when the runtime backend builds the InitData on T8122 with the 14.8.3 firmware. Add asahi.t8122_hwdata_418c (0 or 1, default 1, read-only in sysfs): 0 leaves the range at zero for an A/B comparison; any other value is rejected and the default stays. One kernel log line says which applied. Other SoCs, the T8122 26.x (G16) path and T8122 boots without asahi.t8122_start=1 are unchanged. Tested on hardware (#26), with local builds that set the same 20 words at the same offset: - J613, 10 GPU cores, GPU firmware 14.8.3: the GPU starts, the first compute and render jobs complete, and OpenGL and Vulkan readback pass. The same kernel with the block off stalls at 0x13 again. - J613, 8 GPU cores, same firmware: the GPU starts, OpenGL and Vulkan readback pass, and Hyprland renders on the GPU. This commit itself has not been booted yet. J615 on the 14.8.3 firmware has not been tested. Add host tests (tools/asahi/m3-runtime-tests.rs) for the values, their exact placement with every other byte unchanged, a short buffer, and the parameter parsing. [Chris Kearney: rebased onto integration/aurora; comments, a test name and the log line reworded to describe what the code does] [ryan: adapted to 7.2.10 — carry the HwDataA +0x418c block (t8122_hwdata.rs) and its host tests into the compile-only m3 modules; the InitData write, its layout asserts (m3_adt_config.rs) and the asahi.t8122_hwdata_418c parameter (m3_params.rs) stay with the M3 runtime port, so no module parameter is added for other GPUs] Signed-off-by: Satya Benson <satya@benson.earth> Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> (cherry picked from commit 0d51a40) Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…e driver PHY_APPLE_ATC_KUNIT_TEST is a bool that builds the tests "into the driver", and it allows KUNIT=m when the driver is a module. The Makefile, however, adds atc-tunnel-test.o and atc-t8122-dp-test.o as objects of their own under that bool. They are therefore built into vmlinux while KUnit is a module, and the link fails with undefined kunit_binary_ptr_assert_format and __kunit_abort, as with the Fedora configuration (KUNIT=m, PHY_APPLE_ATC=m). Include both files from atc.c next to atc-test.c instead, so that they are built wherever the driver is, as the option says. Drop their own module metadata, which the driver already provides. The tests came with commit 2421d71 ("phy: apple: atc: add KUnit tests for the T8122 DisplayPort helpers") and commit c30adcc ("thunderbolt: apple: Qualify display tunnels by connector wiring"). Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The integrated RTKit receiver dispatches the debug endpoint and acknowledges admitted channel-zero OSLog counters outside the Neo/M5 and synchronous-log policies. The host fixtures still describe the older opaque-only receiver, so oslog-events and ordered-rx fail before exercising their controls. Extract the current OSLog constants and observe counter acknowledgements, channel admission and the platform no-ACK policies. Add the debug endpoint, policy field and receiver stub to the ordered-RX fixture. Keep its threaded reply-progress and deferred-dimensions assertions intact, and retain support for the legacy receiver used by the 7.2.10 topics. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
DEBUG_WW_MUTEX_SLOWPATH can make an atomic state lookup return -EDEADLK. The resume fixture asserts on that expected retry result while holding modeset locks. KUnit then aborts the test thread with those locks held, and teardown cannot make progress. The lockdep lane reaches this in the fourth resume test even though the ordinary lane passes. Build both the initial scanout and the DPMS-off transition through one helper that releases each partial atomic state, backs off and retries. Always finish the acquire context before returning to a KUnit assertion. Keep all four resume controls and their framebuffer ownership checks. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
A dock can detach and reattach while userspace is still processing the old connector loss. On M1/M2, that stale CRTC disable released the already-starting replacement DPTX session. Firmware then dropped the sink while the CRTC-off gate suppressed relink recovery, leaving only USB2 and the dock billboard device. Apply the existing replacement-session ownership check to every Type-C output, and refresh the CRTC token after a successful modeset so later intentional DPMS still releases the current link. Cover the stale-disable and ordinary-DPMS sequences with a source-extracted host fixture. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
cd321x-pm.h now carries cd321x_dp_send(), which takes u32 arguments and which the probe units do not call. The host units drop <linux/types.h> and build with -Werror, so typec-probe and probe-mux-pm-dispatch stopped compiling once the header gained it. Give the host copy of the header a u32 typedef and mark cd321x_dp_send() unused there. The header and the units' checks are unchanged. [ryan: integration fix for the unified assembly: the header change comes from 170-usb, the host units live here] Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Fifteen call sites queue DCP work on system_wq or system_unbound_wq: the backlight fade, the swap watchdog, the external stop retry, the IOMFB command timeout and backlight retry, the DCPEXT scanout, repattern and desktop work, the iBoot endpoint query, and the link idle work of the v14.7 and v26.6 interfaces. Both queues are deprecated in 7.2. The first item queued on either logs a warning once per boot, as dcp_backlight_fade_work does on J700, and hides any later user. None of these workers needs the CPU that queued it: each takes the DCP or link state through its own locks and references. Queue them all on system_dfl_wq. For the work that was on system_unbound_wq this is the same unbound queue under its current name. The host selftest shim that compiles dcp_external_stop_retry() declares the queue it names, so rename it there too. Keep the delays, coalescing, cancellation and teardown unchanged. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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>
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
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
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
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
Build the CS42L42 and CS42L84 drivers and their real KUnit suites into the combined ARM64 configuration. The existing fragment already enables I2C, PM and ASoC; CS42L42's ALSA/ASoC ioctl tests require built-in linkage. Mark the recorded 98-suite result explicitly historical rather than claiming a new combined-suite count. Leave the runner's toolchain and expected-result policy unchanged. Validation: kunit.py config --arch=arm64 accepts the complete fragment and all five added codec symbols survive olddefconfig as =y, using Clang 22.1.8, Rust 1.93.1 and the corrected bindgen. This is configuration validation; the combined ARM64 kernel was not rebuilt or executed here. Generated-by: LLM Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
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>
|
Thanks, Scott. You were right about ADMAC exposing RESUME; the original explanation was wrong. We never reproduced the I2C hang on cs42l84, so its D2 unmute is restored. The cs42l42/83 workaround now applies only to the observed base-M1 I2C path. Playback there refuses RESUME and requires PREPARE to restore clocks and unmute; capture, SoundWire, J700 and other hosts retain their existing policy. The tests exercise the actual ALSA/ASoC resume path and OF admission, rather than just calling the codec callback. The USB3 workaround is also restricted to base M1. Early role setup only forces USB3 after a USB3 Type-C request; a role arriving before the mux request is retained until the committed mode can apply it. The M2 families keep their previous path. To expand the gate later, I would check both plug orders, host and device roles, role swaps, repeated unplug/replug, suspend/resume, and USB3 alongside DP and a Thunderbolt dock on J414c, against a baseline kernel. RESET_APPLE_CIO is back to built-in, the duplicate fragment entries are removed, and the charging ABI caveat is explicit in the description. The common asynchronous DP re-pairing remains unqualified on M2/J613; I have not presented the M3 tests as coverage for those machines. The G15 error paths, plane bounds and AV lifetime reports are fixed too. In particular, AV teardown stops its initializer and drains captured-owner work while endpoint RX can still answer RPCs. Real-work/devres KUnit tests cover running callbacks, rebind, failed init and successor owners; eight deliberately broken variants fail their runtime assertions. Local results: codec KUnit 52/52; ATC KUnit 36/36; focused AV 26/26 with KASAN and lockdep; broader display 93/93 (the known parser non-static-key INFO is recorded separately). The combined native-enabled ARM64 W=1 build and the host runner results are in the updated description. These are source/build/test results, not new hardware suspend or teardown qualification. Pushed as nine follow-up commits, through 9904393. The full package/KUnit/QEMU boot run is now running; I will keep its outcome separate from the local passes. The latest host runner also passed 56/56. Thanks again for catching these. |
|
Booted
The M3 findings need clearing before I recommend replacing its current kernel:
On the Air, tester 0.1.13 accepts only SEP diagnostics ABI 1, so ABI 2 turns attachment/readiness into skips. A separate passive check on another candidate boot matched the original's attachment, 12 endpoints, open keystore, present keybag, online sensor and cached readiness. ABI 2 reports matching blocked; fingerprint authentication was not tested. The diagnostics implementation is unchanged from the PR base. The skips remain in the original report. The Air/M3 builtin tester launcher also hit an existing private-directory permission error (exit 126). I did not relax permissions; the counts above are from separately collected user-session runs. Other boot-file/package-update checks make assumptions about packaged kernels that these one-shot lab artifacts do not satisfy. None of these failed jobs has been relabelled as a full pass. All three returned to their original default kernels. Existing loaders, installed UKIs, menu bytes and package inventories were verified against the pre-test records. Host WARN/Oops/panic/SError and GPU fail-stop categories stayed zero during the bounded probes. Current loader/DTB composition was used; this does not qualify a new loader, new DTBs, suspend, speaker playback or fingerprint matching. Source binding: the maintained-profile artifact came from the full CI package job; its test-merge tree exactly equals this PR head. The native-G15 build used the exact head with LLVM 22.1.8, Rust 1.93.1 and the corrected bindgen. Live kernel/module notes were matched to that native artifact; Air graphics module notes were independently matched to the CI artifact. CI update: hosted KUnit did finish: 109 suites, 1,533 pass, three known skips, zero failed cases and zero kernel splats. The job was red only because its catalog still required the workqueue warning from the already-repaired parser fixture. CI-only follow-up |
The parser_attribute_deferred fixture now initializes its hotplug work, flushes it and checks that the notification ran. The old warning entry still required the uninitialized-work warning that the fixture repaired. The requested CI run at 9904393 executed 1536 cases: 1533 passed, three intentional skips, no failed cases and no kernel splats. Its only KUnit mismatch was the missing expected warning. Remove that stale entry; keep the strict unexpected-warning checks and the three known skips. Replaying the saved CI results now passes. Injecting that exact warning into the saved parser case still fails the checker. The 112 CI tool tests pass. This changes no boot-tested kernel or fixture code. Fixes: ae83957 ("drm/apple: initialize the deferred attributes hotplug fixture") Generated-by: LLM Signed-off-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
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>
maralcbr
left a comment
There was a problem hiding this comment.
Thanks @iconidentify. I re-reviewed the eleven commits after Scott's review (31da1692..d60121ff) and the generic-subsystem hunks. I see no remaining production-code blocker in the follow-ups.
Verified fixed
- Headphone resume. cs42l84 keeps its D2 unmute again (
sound/soc/codecs/cs42l84.c:610). The cs42l42/83 guard only applies with anapple,t8103root and an I2C codec. All five base-M1 DTs (J274, J293, J313, J456, J457) carry I2Ccirrus,cs42l83. DPCM gives the BE the FE's runtime (soc-pcm.c:1848), andhw_paramsresetsruntime->infobefore prepare (pcm_native.c:849), so clearing RESUME at prepare does force the re-prepare. SoundWire setssdw_peripheralbefore common probe, so it stays excluded. - USB-C PHY on M2. With
t8103_usb3_workaroundfalse, every changed ATC path reduces to the base behaviour: one lock attempt,host_bist == host, and the retry/pending branches never arm. On M1, the retry flag is cleared on every non-USB3 transition (atc.c:4728,:4785,:4822), so I found no sticky reconfiguration loop. This is source equivalence, not M2 qualification. - Greptile P1s.
Shared::orphanallocates under aMutexbefore ownership moves andmem::forgets on failure. Registry creation is inside the guarded closure. P030/P230 Interchange is refused throughformat_mod_supported(DRM core rejects a CRTC without an FB before atomic_check). The AV cleanup is safe to run twice:afk_quiescetakes ERR/NULL, and the second drain only flushes.external_audio_workenable/disable stays balanced across bind, unbind, suspend and resume. - Config.
RESET_APPLE_CIO=y;USB4_APPLE_SOCandTYPEC_SN201202Xnow appear once each. - Thunderbolt teardown.
tb_domain_removestops the CM undertb->lock(which clearshotplug_activeanddp_tunnel_pending), then flushestb->wqbefore unregistering. The worker's domain reference follows the hotplug-work pattern. No lifetime problem found.
Before merge
- CI. The
aurora-sepfailure at03c3afe7was test fragility, not a kernel regression, andd60121ff's atomic FIFO swap fixes the right thing. Everything is green atd60121ffexceptcommits, which is still pending. That one needs to finish green. - Your own M3 note: the candidate had no
apple-panel-blbacklight on J516S, and the original kernel has it. Until that has a cause, I'd keep it open. It may be a release gate rather than a merge gate, but it shouldn't get lost.
Maintainer decisions (I'll take these before merge)
- G15 cross-client isolation. The PB heap (
LEAF_CACHEDdecodes toPROT_GPU_RW) and the PB block/page lists (LEAF_PB_LISTdecodes toPROT_FW_GPU_RW) are single physical objects, aliased into every user VM at fixed GVAs (g15/pools.rs:372-390,g15/vm.rs:295). That's the same GPU access class as user memory. If user work can reach those GVAs, one client could read another's PB leftovers, or rewrite block-list records that a later render of another client consumes. Nothing here proves shader reachability. But G15 shouldn't go default-on until we know. For an opt-in, default-n backend I'm fine to merge with this tracked as an issue. - Generic scope.
tb.casync DP re-pairing runs in the shared software CM, so it reaches every Mac's USB4/TB path, M2 and J613 included. Theauto-dischargecharge-behaviour value still follows open AsahiLinux#521. Both are disclosed. I'm recording them as accepted, not just disclosed.
Smaller, pre-existing
apple_plane_get_fb_layout()still setsbuf_sizeto the sum of plane sizes (as the removed code did). With a gap between planes, plane N's end can sit past the advertised size (plane.c:203,:448). Using the maximum validated relative end would make the advertised span match what is checked.
maralcbr
left a comment
There was a problem hiding this comment.
Approving at d60121ff: CI is green, and my review above covers the follow-ups. I accept the maintainer items listed there for this opt-in merge (G15 isolation tracked before default-on, generic TB re-pairing, auto-discharge ABI).
Both blockers are verified fixed at d60121f: cs42l84 keeps its D2 unmute, the cs42l42/83 workaround is limited to base-M1 I2C, and the ATC USB3 workaround is gated to apple,t8103, so the M2 families keep the base paths. Details are in maralcbr review 5622374957.
Move to omacom/linux-aurora 42672ed79dead511ecf65e96d988a98a0f94b5bb, which merges omacom/linux-aurora#177: the 7.2.11 update, the opt-in M3 Pro/Max native G15 backend, T6030 dock, SIO and PMP fixes, opt-in HDMI audio, and SEP, charging, USB and codec fixes. The kernel-owned asahi.config adds APPLE_SIO_T6030=y and TYPEC_TPS6598X=m. The asahi DRM UAPI is byte-identical, so mesa-aurora stays matched. The kernel version moves, so _aurorarel resets to 1, giving 7.2.11.aurora1-1.
M3 Max (J516C): on-demand parameter buffer, panel EDID and 120 Hz, CDM walk fix (stacked on omacom#177)
This brings the reviewed public-source SiliconForest kernel work onto
integration/aurora: M1/M2 keep the maintained GPU ABI and defaults, while M3 Pro/Max gain an opt-in native G15 backend and the display, power and lifetime fixes it needs. It also restores M3 DP tunnel retry policy lost in the #139 merge, so a second dock stream can retry while a display processor finishes its HDMI settling period.Hardware qualification remains in progress. The earlier production tree booted on M1/J293, M1 Air/J313 and M3 Pro/J516S. The review fixes below have local source/build/test coverage; they are not claimed as new hardware boots.
Base and scope
Included work
auto-dischargeABI value follows still-open AsahiLinux#521 and may change upstream; consumers must not depend on it yet.Review fixes and validation
Current review head:
99043939ac7d23685f1fdb33763c47926c1ffc77.W=1compilation covers Rust, Asahi/G15, Apple DRM, PHY and both codecs with LLVM 22.1.8, Rust 1.93.1 and the corrected bindgen. Existing ATCsw/muxdocumentation warnings are unchanged. CI-tool unit tests: 112 passed.RESET_APPLE_CIO=yand removes duplicate Type-C/USB4 fragment entries. Both codec suites are now included in the full ARM64 KUnit CI configuration. The full package, KUnit and QEMU boot CI is running for this head; results are pending.Earlier production qualification used
068fd097; later31da1692changed tests/CI only. Both production profiles built full Image/modules/DTBs. Lab boots used existing DTBs, so new DTBs are not hardware-qualified by those runs.Original defaults, packages and loader/UKI hashes were restored after those one-shot checks. The M3's installed release guard intentionally keeps an unregistered test desktop on software GL; independent hardware client readback does not qualify the desktop or signed release.
Remaining limits
Original authors and source PRs are credited per commit. Chris signs his contributions; adaptations and generated work carry
Generated-by: LLM. Advisory historical checkpatch findings are retained rather than hidden as test exceptions.