Skip to content

Bring up T6041/J616c GPU, protected audio and HEVC - #525

Merged
RyanTheTide merged 12 commits into
aurora-silicon:integration/aurorafrom
astaff:t6041/j616c-gpu-audio-video-20261027
Nov 5, 2026
Merged

RyanTheTide merged 12 commits into
aurora-silicon:integration/aurorafrom
astaff:t6041/j616c-gpu-audio-video-20261027

Conversation

@astaff

@astaff astaff commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Why

The M4 Max (T6041, J616c) is in the same SoC family as the M4 Pro. This series shares one T604x description and lets T6041 differ only where it measurably does: the 40-core GPU and its firmware profile, the board, its display firmware, protected AOP audio and HEVC.

What

  • arm64: dts: apple: split the shared SoC and PMGR description into t604x.dtsi and add the J616c board. J616s and J614s DTBs are byte-identical.
  • drm/asahi: share the T604x register windows; add T6041 with its static firmware profile and a tiler segment control local to that build.
  • drm/apple: accept the T6041 display firmware; wait for flip_done in the commit tail.
  • soc/apple, ASoC/apple: word access for the AOP boot arguments; protected J616c audio.
  • media/apple/avd: admit HEVC on T6041 without a codec list.
  • tools: check T6041 initialization data against explicit captures.

No module parameters or environment switches. The watchdog and ANE driver changes moved to their own PRs.

Testing

Kernel is the merge of this PR with #732, #749, #920 and the ANE and watchdog PRs, with Mesa #85 and no local patches, on a J616c running NixOS. Serial rendering is off and the command line has no driver parameters. Logs: dmesg, journalctl -b -p 3, getenforce output, cmdline and the list of what was exercised are at https://gist.github.com/astaff/d1f649ba0d29f5279762e2baa427e732.

  • On this merge: 20 gpu-niri replays, 10 minutes of mixed rendering, whisper.cpp 123/123, 0 recoveries, device loss or app resets.
  • On an earlier merge of this stack, on the previous base and without the display gate: 120 replays, 65 minutes of mixed rendering across three boots, whisper.cpp 800/800, 0 recoveries, device loss or app resets.
  • AVD HEVC: 4/4 fixtures pixel-identical to software decode.
  • eDP is connected and enabled on this merge; picture, keyboard and trackpad were confirmed by hand on an earlier merge.
  • dt-validate on t6041-j616c.dtb: the same 3 ANE property warnings as J616s and J614s, nothing else.
  • NixOS has no SELinux, so enforcing mode can't be shown.

Limits

  • The earlier reason-0 firmware restarts did not occur in this testing, but their root cause is not identified. The tiler change is not a fix for them.
  • The GPU profile is a static calibration of one 40-core part. The loader handoff is a follow-up; see the review thread.
  • Audio needs the boot-loader handoff and the protected userspace. Speaker playback was not part of this proof.
  • CTS, sustained load and suspend are not qualified.

Companion Mesa series: aurora-silicon/mesa#85.

🤖 Generated with Claude Code

@astaff
astaff force-pushed the t6041/j616c-gpu-audio-video-20261027 branch 4 times, most recently from 9f4d81b to edbddfe Compare October 28, 2026 21:26
@astaff
astaff marked this pull request as ready for review October 28, 2026 23:10
@AxxzyWasTaken

Copy link
Copy Markdown
Contributor

Possible cause of the reason-0 / concurrent-render restarts: TA cluster mode (0x1c890)

On our J616C (M4 Max, 25G83 firmware, our own G17 port, not this branch), the reason-0 no-progress kills went away when the tiling stage runs non-clustered. The only change is one register in the TA register list:

- push(RegisterWrite::new(0x1c890, 0));
+ push(RegisterWrite::new(0x1c890, 1));

The cluster merge-buffer writes (0x1c041/0x1c9d0, 0x1c948, 0x1c888, 0x1c089/0x1c9e0, 0x16c41/0x1ca40, 0x1c920) and 0x1c9a8 stay as they are.

What we measured with it:

  • A Minecraft (OpenGL) frame replay that hung on 3 of 4 runs before: 0 of 14 with 0x1c890 = 1.
  • Roblox (Vulkan, Android client under Cordial), which previously hit reason-0 kills within seconds: now plays without recoveries at full GPU effort with concurrent renders (no serial-render workaround).
  • Killed renders before the change never started: the TA/3D start timestamps stayed 0.

Our guess, not verified: in clustered mode those merge-buffer registers point at buffers laid out for the two-cluster M4 Pro, which doesn't fit the M4 Max's four clusters. Non-clustered sidesteps that rather than sizing the buffers properly.

Untested: 25F84 firmware and this branch's code.

astaff added a commit to astaff/linux that referenced this pull request Oct 30, 2026
Keep all shared firmware profiles at TA 0x1c890 = 0 and enable mode 1
only in T6041's admitted 25F84 build. Pass that device/build policy
through RenderArgs without changing register ordering, merge-buffer
writes, fragment programs or serial-render admission.

Add KUnit coverage for the policy boundary and constructor output,
including SCS array shape and unchanged fragment/G17P arrays.

Motivated by AxxzyWasTaken's separate J616C/25G83 implementation results:
aurora-silicon#525 (comment)
Those results do not validate this branch or its 25F84 firmware; the
cluster merge-buffer explanation remains a hypothesis.

Validation: patch application/reversal, whitespace and source-scope checks.
Not yet compiled, KUnit-executed or hardware-tested. Keep the existing
asahi.t6041_serial_render=1 workaround pending the concurrent-render test
matrix documented in the PR.

astaff commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Pushed experimental T6041/25F84 TA-mode workaround in c048e0e.

The device's admitted 25F84 profile now enables 0x1c890 = 1; all shared profiles, including M4 Pro's V25G83 profile, retain zero. Register ordering/counts, merge-buffer writes, 0x1c9a8, fragment programs and serial-render admission are unchanged. Three KUnit tests cover policy selection, the one-write TA difference with/without SCS, and unchanged fragment/G17P arrays.

Validation status: patch applicability/reversal, whitespace and source-scope checks passed. This commit has not been compiled, KUnit-executed, booted or hardware-tested. The earlier PR build results apply to the previous head, not this commit.

AxxzyWasTaken's report concerns a separate J616C implementation with 25G83 firmware: Minecraft changed from 3 failures in 4 runs to zero in 14, and Roblox reportedly ran concurrently without the previous recoveries. It does not validate this branch or 25F84. “Non-clustered tiling” and the cluster merge-buffer explanation remain hypotheses.

1. Build and constructor regression tests

Using the branch's existing configured ARM64/16-KiB build and supported Rust/LLVM toolchain, build the affected driver once with KUnit disabled, then with CONFIG_KUNIT=y and Asahi built in. For example, substitute the actual existing build directory:

make ARCH=arm64 LLVM=1 O=/path/to/existing-build-dir drivers/gpu/drm/asahi/
python3 tools/asahi/g17-firmware-selection-tests.py

Boot the KUnit-enabled kernel with kunit.filter_glob=asahi_g17_ta_mode*. All three suite cases must pass; retain the KTAP output. SCS tests exercise array shape, not hardware ray-traversal support. Also run the existing G17 buffer/layout and admission regressions.

2. Four-way comparison on this J616C/25F84 machine

Kernel TA value Boot parameter Purpose
Previous head edbddfe9fa0f 0 asahi.t6041_serial_render=0 Reproduce failure
Previous head edbddfe9fa0f 0 asahi.t6041_serial_render=1 Existing stable control
This commit 1 asahi.t6041_serial_render=0 Main concurrency test
This commit 1 asahi.t6041_serial_render=1 Fallback compatibility

Reboot between cells: serial admission is configured during registry initialization. Keep firmware, Mesa commit, replay/app versions, resolution, power profile and instrumentation fixed. Record uname -r, /proc/cmdline, the firmware identity log and effective parameter if exposed in sysfs. Serial=1 should produce the explicit serial-admission warning. A temporary one-shot trace/log of the constructed register entry can confirm the actual live TA value.

Start with at least 20 repetitions per cell of the same failing replay/workload. Add independent concurrent GL and Vulkan clients alongside the compositor/Chrome. Record pass/fail counts, time to failure, rendering correctness and frame times. If promising, extend to 100 replay runs plus at least one hour of mixed concurrent rendering over several boots; these are initial acceptance targets, not a stability guarantee.

3. Prove concurrency and watch recovery

Capture the kernel log for each test. Count reason-0 recoveries separately from other recoveries, firmware crashes, timeouts, failed fences, device loss and app/compositor restarts. A recovered desktop is not an uninterrupted pass. Reboot after a hang or incomplete recovery before starting another independent sample.

Use the existing asahi_g17:asahi_g17_publish and asahi_g17:asahi_g17_complete tracepoints. Match context/sequence, engine and QID; demonstrate multiple render passes outstanding across independent clients with serial=0. GPU start/end interval overlap is stronger evidence of overlapping execution. Verify nonzero completion timestamps and successful fences. Preserve pre-recovery timestamp snapshots if available: completion traces alone cannot prove whether interrupted work started.

Check a representative dEQP/CTS subset including MSAA, layered/large targets and partial-render/buffer pressure. Compare performance and power/thermal behavior. An unchanged T6040/25G83 M4 Pro run is useful additional regression coverage.

Keep the serial-render workaround. If mode 1 regresses, revert this commit and boot the original serial=1 control; serial=1 on this patched kernel still uses TA mode 1. No hardware result for this commit is claimed.

@astaff
astaff force-pushed the t6041/j616c-gpu-audio-video-20261027 branch from c048e0e to 3d0938d Compare November 3, 2026 20:33
AxxzyWasTaken added a commit to AxxzyWasTaken/linux that referenced this pull request Nov 3, 2026
Bring the branch up to the current base. The conflicts are in the aurora-silicon#525
commits underneath, so they take the resolutions from aurora-silicon#525 at 3d0938d:
the tree is aurora-silicon#525 at that commit, the 25G83 profile and this base.
astaff added a commit to astaff/linux that referenced this pull request Nov 4, 2026
Keep the shared firmware profiles' tiler segment control (0x1c890,
0x1c918) and enable mode 1 (0x1c890 = 1, 0x1c918 = 0) only in T6041's
admitted 25F84 build. Pass that device/build policy through RenderArgs
without changing register ordering, merge-buffer writes, fragment
programs or serial-render admission.

Add KUnit coverage for the policy boundary and constructor output,
including SCS array shape and unchanged fragment/G17P arrays.

Motivated by AxxzyWasTaken's separate J616C/25G83 implementation results:
aurora-silicon#525 (comment)
Those results do not validate this branch or its 25F84 firmware; the
cluster merge-buffer explanation remains a hypothesis.

Validation: patch application/reversal, whitespace and source-scope checks.
Not yet compiled, KUnit-executed or hardware-tested. Keep the existing
asahi.t6041_serial_render=1 workaround pending the concurrent-render test
matrix documented in the PR.

Assisted-by: LLM
@astaff
astaff force-pushed the t6041/j616c-gpu-audio-video-20261027 branch from 3d0938d to 84612a4 Compare November 4, 2026 00:40

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. An M4 Max running niri and whisper.cpp as a daily driver is great news, and splitting the T604x DT out of t6040.dtsi is the right shape. We built and tested the whole stack (this PR plus aurora-silicon/linux PRs 732, 749 and 920) on our fleet, and the results are at the bottom. Before it can merge, these need fixing. The first two are hard blockers.

Required fixes

  1. Signed-off-by on every commit (hard blocker). None of the 20 commits in this stack has a Signed-off-by:. Every commit in aurora-silicon/linux needs the author's own DCO sign-off, and nobody else can add it for you. Please add Signed-off-by: Your Name <email> directly after Assisted-by: LLM, with no blank line between them. git rebase --signoff integration/aurora on each branch, then a re-push, does it in one go.

  2. Gravity Linux provenance doc in drivers/gpu/drm/asahi/g17/fw/initdata/v25g83.rs (hard blocker). e7c66a2 ("add T6041 and the measured 25F84 firmware profile") deletes the module doc at lines 3-17, which records that the 25G83 constants were "derived from the G16 encoders of Gravity Linux". That's the attribution for GPL-2.0-only code we owe to its authors, and it can't be removed. Please restore it exactly as it was. If you want to add a 25F84 note, put it after the existing text. The same hunk also drops the AON_TABLE doc comment, please put that back too.

  3. Untested top commit 84612a4 ("scope experimental TA mode 1 to T6041 25F84"). Its message says "Not yet compiled, KUnit-executed or hardware-tested", and hw/t6041.rs:63 calls it an unverified experimental workaround. It does compile now (we built it). Please run it on your M4 Max and reword the message to say what you ran, or drop it from this PR.

  4. Three new module parameters. The tree's rule is that the DT and the firmware the driver finds decide behaviour, with no new module or kernel parameters.

    • drivers/gpu/drm/apple/dcp.c:233 appledrm.t6041_fw_26_5: if 26.5.2 DCP firmware is what you run, admit it as a supported version like 26.6.2, with no opt-in and no "unqualified" warning.
    • drivers/gpu/drm/asahi/asahi_core.rs:225 asahi.t6041_serial_render: you've said concurrency is fixed now, so please drop it together with Pool::serialize_render and its caller at g17/runtime.rs:219.
    • asahi_core.rs:229 asahi.t6041_fw_log: the firmware-log switch belongs behind a debug build or dynamic debug, not a parameter.
  5. Per-device policy in global statics. g17/fw/compute.rs:36 (static PROGRAM: AtomicU8) and g17/fw/compute_pool.rs:21 (static BASE_BLOCKS: AtomicUsize) are written in Gpu::new() and read from the queue code. Please carry both on the per-device Variant/CoreLayout that already reaches that code, the way ta_mode_1 does. That's the same pattern T6040's config uses.

  6. Three host tests aren't registered. tools/asahi/run-host-tests.py fails the run on any unregistered script, so the gate currently fails on aop-bootargs-tests.py, g17-t6041-initdata-tests.py and t604x-cpu-order-tests.py. Please add them to ASAHI_TESTS (line 55) with their arguments. We ran them by hand, and aop-bootargs passes (with its negative control). cpu-order passes on the j616s, j614s and j616s-tether DTBs (14 cores) and on j616c (16 cores).

  7. apple-dcp host selftest desktop-powerlog-framing no longer compiles (84/85). powerlog_report() now calls parse_system_log_mnits_pairs() and dev_info(), and the fixture in tools/testing/selftests/drivers/gpu/apple-dcp/desktop.py extracts neither. This fixes it locally, bringing the display group to 18/18 and the full run to 85/85:

    --- a/tools/testing/selftests/drivers/gpu/apple-dcp/desktop.py
    +++ b/tools/testing/selftests/drivers/gpu/apple-dcp/desktop.py
    @@ -582,6 +582,8 @@ def powerlog_framing(root):
         prefix += block(parser, 'int parse_system_log_mnits(')
    +    if 'int parse_system_log_mnits_pairs(' in parser:
    +        prefix += block(parser, 'int parse_system_log_mnits_pairs(')
         prefix += r'''
    @@ -589,6 +591,7 @@ def powerlog_framing(root):
     #define dev_dbg(...) ((void)0)
    +#define dev_info(...) ((void)0)
     #define dev_warn(...) ((void)0)

    Please also add a case that feeds the headerless pairs form, so the new fallback path is covered.

  8. 25F84 recovery workarounds. g17/queue/mod.rs:168 drops ECANCELED/ENODATA/EBUSY fence errors, and g17/recovery.rs:285 spares a blamed VM on reason 0. The commit message itself says concurrent-render restarts and recovery are unresolved, so these hide a firmware fault rather than fix it. If your concurrency fix lives in a newer branch, please bring it in here and drop these.

  9. AVD HEVC admission by machine and file size. drivers/media/platform/apple/avd/avd-drv.c:570 checks of_machine_is_compatible("apple,j616c") and fw->size == 0x12000. Please drive it from match data or a DT property on the avd node instead.

  10. Static calibration. hw/t6041.rs:159 hardcodes leakage coefficients and max power from one machine, and T6041 skips Calibration::read(). Leakage is per die, so like T6040 it should come from the DT the loader fills, with Chip holding only the layout overlays. The empty HW_DATA_WORDS/POWER_CONFIG_WORDS tables can go until something uses them.

  11. Boot-log noise. The four bring-up: dev_info! lines (g17/mod.rs:1512 and following) print on every G17 boot. We see them on our M4 Pro and on the A18 Pro Neo. Please make them dev_dbg!.

  12. Model string. t6041-j616c.dts:12 reads "Apple MacBook Pro (16-inch, M4 Max, Nov 2024)". Our model strings carry no year or month, so please change it to "Apple MacBook Pro (16-inch, M4 Max)", matching J616s's "(16-inch, M4 Pro)".

  13. dtbs_check on t6041-j616c.dtb gives 19 new warnings. 4 also appear on J616s (the ANE properties), and the other 15 are J616c-only:

    • apple,t6041-ascwrap-v6 is missing from the mailbox binding;
    • per-node nonposted-mmio on aop, admac, i2c and dart, and dma-noncoherent on aop and display-subsystem;
    • the Wi-Fi node is brcm,bcm4329-fmac with no pci14e4,xxxx first;
    • gpio-low under smc.
      Please get these down to the J616s set.
  14. Watchdog commit 6f8cd13 (nowayout/parent) is a good fix but isn't T6041-specific, and it adds a module parameter (apple_wdt.c:57). Please split it into its own PR.

  15. Shared-code behaviour changes need their reasoning in the commit messages, since they run on our other machines:

    • apple_drv.c:574-581 replaces commit_tail_rpm with flip-done waiting on every machine;
    • aop.rs:2642 turns on word-access bootargs for HW_CFG_T6040, so the J616s too;
    • macaudio.c:522-525 now stops every playback stream of J616/J614 cards when the speaker lease is lost. It keeps protection on and is stricter, which is fine, but say so.

What passed on our side

Test kernel 7.3.0-aurora-am4t1 = integration/aurora 565c802 + this PR + PRs 732, 749 and 920 (clean merge; this PR is 6 commits behind its base).

  • Build and gates:
    • builds clean;
    • W=1 adds 0 new warnings across drm/apple, the Rust GPU driver, accel/ane, AVD, soc/apple and sound/soc/apple;
    • KUnit no worse than base: drm/apple 111+1 skip, display-gate 49/49, ANE boot 205/205 and transport 205/205 (base 201/201 each), AVD 40/40.
  • Device trees: every existing board's DTB is byte-identical before and after, and the j616s, j616s-tether and j614s decompiled diffs are empty, so the t604x.dtsi split is a pure move.
  • M4 Pro (J616s), one-shot boot, SELinux enforcing:
    • same row as fleet16: no kernel errors, 0 AVCs, no failed units;
    • eDP plus two external displays, Wi-Fi, BT, Touch ID;
    • AOP and ALS come up with word-access bootargs, and speaker protection is active;
    • glmark2 17570/17530 vs 17562/17381 on fleet16;
    • 20 more warm boots were clean.
  • A18 Pro (Neo), one-shot boot: same row as baseline, and glmark2 within 2% on that fanless machine.
  • ANE: the H16 terminal-ring drain from PR 920 doesn't change our M4 Pro's known ANE startup stall (2 of 20 boots, against a 15% base rate). It isn't a regression, just not the fix we hoped it might be.

Once it's revised, please post from the M4 Max a boot log (dmesg), journalctl -b -p 3, getenforce, your kernel command line (with no appledrm./asahi. parameters) and a short list of what you exercised. That's the M4 Max proof we'll merge on.

AxxzyWasTaken added a commit to AxxzyWasTaken/linux that referenced this pull request Nov 4, 2026
t6040.dtsi keeps aurora-silicon#525's split. The base dropped dma-noncoherent from a node
that moved to t604x.dtsi, so that removal goes there.
Reuse the existing SoC and PMGR descriptions as the shared T604x base.
Keep the M4 Pro DRAM class in t6040.dtsi on top of it. The J614s and
J616s compiled trees keep every node and property unchanged.

Assisted-by: LLM
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Describe the Max CPU, OPP and register-window differences on the shared
base. Preserve the qualified J616c node and property values.

Assisted-by: LLM
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Move identical register-window constructors into a family helper.
The T6040 and T6041 initialization-data checks retain their exact values.

Assisted-by: LLM
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Select a static 25F84 profile and admit the normalized loaded image
measured in three qualification boots. Remove exploratory overrides
and unknown-image admission from the support path.

Assisted-by: LLM
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Accept 26.5.2 firmware on the T6041 display controllers and add
headerless powerlog parsing.

Assisted-by: LLM
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
A DCP commit signals flip_done from its swap completion, after the rest
of the commit tail has run. drm_atomic_helper_commit_tail_rpm() waits
with drm_atomic_helper_wait_for_vblanks(), but appledrm never calls
drm_vblank_init(), so drm_crtc_vblank_get() fails and that wait returns
at once. A blocking commit therefore returned before flip_done, and
drm_atomic_helper_setup_commit() refuses a nonblocking commit on the
same plane until flip_done. A page flip right after drmModeSetCrtc()
failed with -EBUSY ("busy with a previous commit"), which is what
glmark2-es2-drm hit on the J616c.

Wait with drm_atomic_helper_wait_for_flip_done() instead. The rest is
the sequence of drm_atomic_helper_commit_tail_rpm(), in its order. That
helper makes no runtime PM calls: its name stands for enabling CRTCs
before committing active planes, and this keeps that.

The change is not scoped to the J616c. Neither the empty vblank wait
nor the -EBUSY check depends on the SoC, so a per-machine tail would
only leave the race on the others. On every appledrm machine:

- A blocking commit returns after the swap completes and holds its
  modeset locks until then.
- A nonblocking commit's worker finishes later. The next commit was
  already held back by flip_done, so the flip rate does not change.
- Nothing waits when flip_done is complete early: CRTCs that stay off,
  legacy cursor updates, and the T8132 backend, which sends the event
  from its flush.
- A lost event costs 10 s and an error in the commit that lost it. The
  next commit's dependency wait already has the same bound, so this
  adds no new hang.

Framebuffer lifetime does not depend on this wait: displaced scanout is
already retained until its swap completes.

Seen and tested on the J616c only.

Assisted-by: LLM
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Patching the AOP boot arguments read and rewrote the whole table with
memcpy_fromio() and memcpy_toio(), which choose their access widths from
alignment and length and write back every byte.

Add an AopHwConfig setting for explicit access: read the table in
aligned 32-bit words, rounded out to word boundaries so that
neighbouring bytes are kept, write only the words that changed and read
each one back.

This was chosen for the J616c bring-up so that the first accesses to its
AOP SRAM had a known width. It does not fix an observed fault: the bulk
copy was not run on that machine.

The setting is on in HW_CFG_T6040, so it is not J616c-only. t604x.dtsi
gives the J614s, J616s and J616c the one apple,t6041-aop compatible, and
HW_CFG_T8132 (J713) is a copy of HW_CFG_T6040. Scoping it to the T6041
would take a second compatible, which changes the T6040 device trees, or
a machine check.

On those machines the values written do not change. The access width
does, and there are new ways to fail the probe: -EIO when a word does
not read back, and -EINVAL for an empty table or one whose rounded end
passes the window. Every other SoC keeps the bulk copy.

Synthetic MMIO checks cover malformed tables, bounds and failed
readback. Run on the J616c only.

Assisted-by: LLM
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Describe the six amplifiers and headphone jack in the J616c board DT.

Stop playback when the speaker protection lease is lost on SN012776
cards fed by the AOP. Until now a lost lease only clamped the amp gains,
and the stream kept running with its protection daemon gone or stuck in
a stalled sense capture. The clamp stays; the stream now also goes to
XRUN, so its client sees the loss.

This is shared macaudio code and it is stricter than before. It applies
to the J616c, the J616s and the J713. The J614s uses the same condition
but binds no speaker link, so it has no lease and never gets here.
Narrowing this to the J616c would give machines with the same amps and
the same AOP path different protection, and would take a new match entry
for it.

The stop covers every playback stream of the speaker card, which on
these machines carries only the speaker stream. The headphone jack is a
card of its own and keeps playing. It is a stop, not a refusal: a client
that prepares again plays at the clamped gain until the lease returns.

It fires only when the speakers go from unlocked to locked, so not at
boot, and not for the kernel's own lock across system sleep, where ASoC
suspends the streams itself. A daemon that exits cleanly also loses the
lease. Other amps and non-AOP SN012776 cards behave as before, and the
MAX98360A path still stops only its software-gain streams.

Lease loss was tested on the J616c only.

Assisted-by: LLM
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
The T6041 AVD shares its "apple,t6041-avd" compatible with T6040, which
holds HEVC back until the firmware lists it. Give the T6041 node a more
specific compatible and a variant that holds nothing back, so HEVC is
also available on firmware that publishes no codec list. A firmware
that does publish one still limits the set.

Assisted-by: LLM
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Build the production initialization objects with their soft-float types
and compare constants with explicit capture inputs. Keep T6040 per-chip
calibration validation separate; include no captures or local defaults.

Assisted-by: LLM
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
m1n1 compares DT CPUs with its physical MPIDR enumeration. Appending the Max cores to the Pro topology put CPU 9 out of order and stopped boot before kernel entry.

Define the full family topology in hardware order and remove the extra cores from T6040. Check the compiled DTB order for both SoCs.

Assisted-by: LLM
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
macOS on J616c writes 0x1c890 = 1 and 0x1c918 = 0 for its tiling passes,
where the shared firmware profiles write 0x200440 and 4. Do the same in
T6041's 25F84 build and leave the shared profiles unchanged. 0x1c9a8
stays at the shared 0x3c; macOS writes 0x5c here.

This does not fix the 25F84 reason-0 restarts under concurrent rendering.
They still occurred with these values on an earlier base, also with
0x1c9a8 = 0x5c.

Ran on J616c with 25F84, with PRs 732, 749 and 920 and Mesa ca90d8c1919,
serial rendering off and the firmware log on: three boots of niri, DMS
and 20 Whisper runs each, with no GPU recovery. Add KUnit coverage for
the policy boundary and constructor output.

Link: aurora-silicon#525 (comment)
Assisted-by: LLM
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
@astaff

astaff commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Re Item 10: Postponing this. The loader should supply T6041 calibration, but this work currently runs on a customized m1n1, and the handoff is better done properly on Aurora's m1n1 later than built on a local one. Until then, the 40-core J616c keeps the static profile, documented as such, with the handoff as a tracked follow-up.

RyanTheTide added a commit that referenced this pull request Nov 5, 2026
T6041/J616c GPU, protected audio and HEVC (supersedes #525)
@RyanTheTide
RyanTheTide merged commit 18ca0a6 into aurora-silicon:integration/aurora Nov 5, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks astaff, this round covered everything from the review. Sign-offs, the Gravity Linux doc, the module parameters, the per-device policy, the host tests, the boot log, the model string, the dtbs_check warnings and the commit messages for the shared changes are all sorted. It's merged now through #958, which keeps your twelve commits as they are and adds three small ones of ours on top. That PR explains each one, the short version:

  • We dropped the speaker lease-loss stop in macaudio.c. It wasn't wrong, but the in-graph protection interface in ASoC: apple: speaker protection ownership for in-graph protection #922 replaces that lock and already stops every speaker stream on withdrawal, and the two collided. The J616c keeps the J616s handling until that lands. Your J616c audio DT is unchanged.
  • The headerless powerlog line is dev_dbg now, it printed on every brightness report.
  • Variant::version and is_25f84() are gone, they were only read by a KUnit test and warned on every normal build.

On our M4 Pro the whole stack boots the same as our current kernel with SELinux enforcing, details in 958.

Item 10 is fine as a follow-up like you said. The calibration handoff and the dcpext firmware memory fill from #749 both want to live in Aurora's own loader, so when you get to it please open those against our m1n1. Also if you ever catch why the first two HDMI mode-sets fail with 0x6 at boot, that'd be great to know.

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.

3 participants