Skip to content

soc: apple: mcc: enable T8103 DCS dynamic clock and power gating - #3506

Merged
DjDeveloperr merged 5 commits into
mainfrom
feat/t8103-mcc-dcs-lp
Dec 1, 2026
Merged

DjDeveloperr merged 5 commits into
mainfrom
feat/t8103-mcc-dcs-lp

Conversation

@erikwb

@erikwb erikwb commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

What: Support apple,t8103-mcc in drivers/soc/apple/mcc.c to assert MCC broadcast low-power bits (0x30000000 at +0x004) and per-channel DCS dynamic clock and power gating (0x1100 at +0x00c across all 8 channels) at probe, re-assert them in resume_noirq after firmware-driven deep sleep, and restore pre-probe values on remove()/shutdown(). Enable &mcc across all T8103 boards in arch/arm64/boot/dts/apple/t8103-peripherals.dtsi (included by t8103.dtsi).
Tested: Local host (6/6), ARM64 KUnit (4/4), W=1 compile (drivers/soc/apple/mcc.o), full arm64 kernel/DTB build, dt_binding_check, CHECK_DTBS=y (5 T8103 DTBs), and checkpatch.pl --strict pass at current head 4e6f95332bbb (details in Evidence). J313 (M1 MacBook Air, T8103) at current head 4e6f95332bbb in a composite trial kernel (origin/main 429e7e15f122 + #3335, #3506, #3508, #3269, #3359, #3289; mcc.o .o/.text byte-identical vs single-PR merge on 429e7e15f122, default cmdline, docked TS5 + DP-2): PASS — "apple-mcc: DCS dynamic clock and power gating enabled on 8 channels", DCS_CTL 0x070a1100 x8 and ps_dcs0..7 0x1f0003ff pre-sleep and after 1x deep S2R (rtcwake -d rtc1 -m mem -s 30, success=1, wake NUB.SPMI0Sw3IRQ), 16 MB RAM canary PASS across deep S2R, eDP-1 DPMS x3 clean, GPU compute/render PASS, 0 failed units, 0 AVC denials, 5 err+ lines identical to default boot (a subsequent post-resume ISP v4l2-ctl capture hung in that composite session with cause unassigned). Earlier standalone isolation at 269a93f2c856 vs matched baseline main (ee36fbdcd1c8) on J313 is in Evidence.
Risk: two-way door · T8103 boards (J274, J293, J313, J456, J457).
Revert: git revert -m 1 <merge-commit> removes apple,t8103-mcc support from drivers/soc/apple/mcc.c and restores status = "disabled" on mcc in t8103-peripherals.dtsi; remove()/shutdown() restore pre-probe register values and no persistent disk or firmware state is written.
Not yet: Remaining queued hosted CI KUnit jobs at 4e6f95332bbb (and re-run of cancelled DWC3/ATC builtin-modular-atc); J313 s2idle coverage (hard-resets J313 on baseline main, so only deep S2R with RTC wake was run); other T8103 boards not in local lab (J274, J293, J456, J457); SELinux-enforcing boot (test machine runs Arch without SELinux policy).

Details

On T8103, boot firmware leaves DCS_CTL bit 12 (dynamic power gating) clear (0x070a0100) on all eight DRAM channels (0x20020000c + ch * 0x40000), keeping all eight ps_dcs0..7 PMGR power domains permanently active at idle (0x1f0002ff, WAS_PWRGATED=0). sleep-t8103.h already enables the same 0x1100 mask during deep-sleep quiesce and restores saved values on wake, so enabling it at probe via of_device_get_match_data() (apple_mcc_t8103_hw in struct apple_mcc_hw) integrates cleanly with deep sleep and preserves the pre-probe register values for remove()/shutdown(). Removing status = "disabled" on mcc in t8103-peripherals.dtsi (included by t8103.dtsi) enables &mcc across all T8103 boards.

Evidence
  • Local verification at 4e6f95332bbb (merge of origin/main dbfbced70b31 into feat/t8103-mcc-dcs-lp; clean against current origin/main a171afd2123f):
    • python3 -I tools/asahi/run-host-tests.py --only mcc-boot-dma: 6/6 passed (mcc-boot-dma-tests, --accept-unresolved, --ignore-detached-supplier, --final-skips-unresolved, --detach-retired-only, --resume-after-detach).
    • python3 tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kconfig_add CONFIG_ARCH_APPLE=y --kconfig_add CONFIG_OF=y --kconfig_add CONFIG_APPLE_MCC=y --kconfig_add CONFIG_APPLE_MCC_KUNIT_TEST=y apple-mcc: 4/4 passed (apple_mcc_test_partial_enable, apple_mcc_test_quiesce, apple_mcc_test_not_ready, apple_mcc_test_t8103_dcs_lp).
    • make LLVM=1 ARCH=arm64 W=1 drivers/soc/apple/mcc.o (defconfig + CONFIG_ARCH_APPLE=y, CONFIG_APPLE_MCC=y, CONFIG_APPLE_MCC_BOOT_DMA=y, CONFIG_APPLE_MCC_KUNIT_TEST=y) and full arm64 kernel/DTB/modules build (7.3.0+): clean (0 warnings in drivers/soc/apple/mcc.c).
    • make LLVM=1 ARCH=arm64 dt_binding_check DT_SCHEMA_FILES=soc/apple/apple,t8140-mcc.yaml and make LLVM=1 ARCH=arm64 CHECK_DTBS=y apple/t8103-j274.dtb apple/t8103-j293.dtb apple/t8103-j313.dtb apple/t8103-j456.dtb apple/t8103-j457.dtb: clean (0 memory-controller@200100000 or apple,t8140-mcc warnings).
    • git diff dbfbced70b31..4e6f95332bbb | ./scripts/checkpatch.pl --strict -: 0 errors, 0 warnings, 0 checks (264 lines checked).
  • Hosted CI at 4e6f95332bbb:
    • Passed: apple-build, dt-checks, host-tests, kunit, rust-build, source, pr-text, DWC3/ATC builtin-no-atc, DWC3/ATC modular-no-atc, KUnit ane-boot, KUnit ane-pm, KUnit dcp-topology.
    • Pending/other: KUnit dcp-fabric in progress (earlier run passed), remaining KUnit * jobs queued; DWC3/ATC builtin-modular-atc cancelled.
  • J313 (M1 MacBook Air, T8103) composite row at current head 4e6f95332bbb (origin/main 429e7e15f122 + #3335, #3506 4e6f95332bbb, #3508, #3269, #3359, #3289; mcc.o .o/.text byte-identical vs single-PR merge on 429e7e15f122; GRUB one-shot, default cmdline, docked CalDigit TS5 + DP-2 3840x2160@120, AC 100%):
    • Boot smoke clean (0 failed units, 0 AVC denials, 5 err+ lines identical to default boot); apple-mcc: DCS dynamic clock and power gating enabled on 8 channels; DCS_CTL 0x070a1100 x8, ps_dcs0..7 0x1f0003ff.
    • Deep S2R mux: apple-display-crossbar: replace the T602x selector fields instead of OR-ing them #1 (rtcwake -d rtc1 -m mem -s 30, ext display DPMS off first): PASS (success=1, wake NUB.SPMI0Sw3IRQ), post-wake DCS_CTL 0x070a1100 x8 and ps_dcs0..7 0x1f0003ff held; 16 MB RAM canary PASS across deep S2R; eDP-1 DPMS x3 clean; GPU compute/render PASS. (Later in that composite session, post-resume ISP v4l2-ctl capture hung with cause unassigned.)
  • Matched first-wake standalone #3506 vs baseline main (ee36fbdcd1c8) ISP isolation on J313 (M1 MacBook Air, T8103, default cmdline, 2026-11-28 20:30–20:41 EST):
    • Baseline main (ee36fbdcd1c8) control (kernel SHA-256 f750b04aebd30c439edbd3b995c17b3fd9ad805a4561dadc7ecbf78040c89289, trial Stage 2 SHA-256 ebf270451dfae099a118f68d98da0d2587ebb69d26affa48dac70a68e7844838):
      • MCC gating OFF: dcs_ctl: 0x070a0100 x8; dcs0..2,4,6,7 0x1f0002ff, dcs3,5 0x1400024f.
      • Pre-sleep ISP capture (v4l2-ctl -d /dev/video0 --stream-mmap=4 --stream-count=90): PASS (during capture: 4 off-0, 14 on; after capture: 18 off-0; 0 ISP/DART errors).
      • After 1x deep S2R (rtcwake -d rtc1 -m mem -s 15): post-wake 1 ISP capture failed with VIDIOC_STREAMON returned -1 (No such device), 1 apple-dart 22c0e8000.iommu translation fault at 0x800b84000 and 9 at 0x800b84200 (status:0x80000800 stream:0 code:0x800 (unknown)), and apple-isp 22a000000.isp: [isp_firmware_boot_stage1] never received first magic number from firmware (-19). Total 29 err+ lines; 1 pre-#3449 failed unit (speakerguardd-v2-switchtest.service).
    • Standalone #3506 (269a93f2c856 merged onto main ee36fbdcd1c8; git diff 269a93f2c856 empty on all 4 PR files before build) (kernel SHA-256 5498ac1f6cbc852fe193c9c273b1a129c243c2f46420503ab12ff2433af53cc6, DTB t8103-j313.dtb SHA-256 d0f5348b74eba08920267d5486fdb6b10d6632f3349958a70a357a2376873dfd, trial Stage 2 SHA-256 19dd511922c8fdda13f021fa049111a8d9ad73134c4eb8da95c4b7655fcee6f6):
      • Pre-sleep: apple-mcc 200100000.memory-controller: DCS dynamic clock and power gating enabled on 8 channels; dcs_ctl: 0x070a1100 x8; dcs0..6 0x1f0003ff, dcs7 0x1000030f; 16 MB RAM integrity PASS (7845e4fcb640aecd); Borealis compute PASS: 2603 runs in 3.0 s, 0 with wrong results, render PASS: 1 runs, 0 wrong; pre-sleep ISP capture PASS (during capture: 4 off-0, 14 on; after capture: 18 off-0).
      • After 1x deep S2R (rtcwake -d rtc1 -m mem -s 15): post-wake readback showed dcs_ctl: 0x070a1100 x8 (dcs0..2,4..7 0x1f0003ff, dcs3 0x1400034f), 3x DPMS PASS (bad_dmesg_lines=0), 0 AVC denials, and the same post-wake 1 ISP failure (VIDIOC_STREAMON -1, 1 DART fault at 0x800b84000, 9 at 0x800b84200, apple-isp -19). Total 29 err+ lines, all 29 messages matching the baseline control after removing timestamps; same 1 pre-#3449 failed unit (speakerguardd-v2-switchtest.service).
      • Isolation result: In this matched first-wake pair, the post-deep-wake ISP/DART fault reproduced on unmodified baseline main (ee36fbdcd1c8) and no additional errors appeared in the standalone #3506 run.
  • Earlier J313 (M1 MacBook Air, T8103) Group A batched boot over main ee36fbdcd1c8 (2026-11-28 earlier pass):
    • Booted Group A kernel SHA-256: 888c041944da96032a9252504c4d5543b906fd98717234eca5e091150af85798
    • Trial Stage 2 image SHA-256: 949dc089ed390b7535dd5ef2a6e99975c3026658e58dbd9d17e9b20d2bbb7d71
    • Byte parity: all changed files of #3506 (269a93f2c856) were verified byte-identical against standalone #3506 (269a93f2c856) merged onto main (ee36fbdcd1c8).
    • apple-mcc enabled DCS dynamic clock and power gating on 8 channels (DCS_CTL 0x070a1100 x8 vs baseline 0x070a0100; dcs0..7 0x1f0003ff vs baseline 0x1f0002ff), held across 2 deep S2R cycles (rtcwake -d rtc1 -m mem -s 30, 0 -> 2, with one transient dcs6 sample after the first), 16 MB RAM integrity PASS, DPMS off/on x3 PASS, 0 Oops/BUG/WARN, 0 AVC denials (one baseline failed unit speakerguardd-v2-switchtest.service also present on baseline main).
  • Prior J313 (M1 MacBook Air, T8103) run at a9ffde2aee76 in batched candidate 9885060f59b1 over main c6bf4998c83f (default kernel command line, one-shot aura-try Stage 2 DTB; 0 Oops/BUG/WARN/SError):
[    0.068954] apple-mcc 200100000.memory-controller: DCS dynamic clock and power gating enabled on 8 channels
pre-sleep:     dcs_ctl: 0x070a1100 x8 | dcs0..7: 0x1f0003ff x8 (WAS_PWRGATED=1)
post-s2idle:   dcs_ctl: 0x070a1100 x8 | dcs0..7: 0x1f0003ff x8
post-deep-S2R: dcs_ctl: 0x070a1100 x8 | dcs0..7: 0x1f0003ff x8 | post-S2R 16 MB RAM PASS
suspend_stats: success=2 fail=0

Live A/B on J313 at a9ffde2aee76 measured -20 mW PHPC mean / -11 mW PSTR min at idle (0 Oops/BUG/WARN/SError).

On T8103 (M1), boot firmware leaves DCS_CTL bit 12 (dynamic power gating)
clear on all eight DRAM channels (0x20020000c + ch * 0x40000), keeping all
eight ps_dcs0..7 PMGR power domains permanently active at idle (0x1f0002ff)
with WAS_PWRGATED=0.

Support apple,t8103-mcc in apple-mcc by mapping the MCC broadcast aperture
(reg[0]) and DCS channel aperture (reg[2]), asserting the broadcast
low-power enable bits (0x30000000) and per-channel dynamic clock/power
gating bits (0x1100) at probe, re-asserting them in resume_noirq after
firmware-driven deep sleep, and restoring the pre-probe register values on
remove or shutdown. Add a KUnit test covering enable, post-sleep reapply,
and teardown restore.

Signed-off-by: Erik Bourget <[email protected]>
Enable the memory-controller@200100000 node on J313 (M1 MacBook Air) so
apple-mcc enables dynamic clock and power gating across all eight DCS
channels, allowing ps_dcs0..7 to hardware power-gate at idle.

Signed-off-by: Erik Bourget <[email protected]>
@erikwb
erikwb requested review from a team as code owners November 28, 2026 09:04
@erikwb
erikwb requested review from Acelogic and maralcbr November 28, 2026 09:04
@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) blast:m1 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Merge readiness at 4e6f9533: not ready yet

Check Detail
CI at head running running: host-tests, KUnit scaler, KUnit macsmc, KUnit clpc, KUnit apple-spmi-nvmem, KUnit trusted-keys
Review ok approved by DjDeveloperr
Requested changes ok none
Hardware row at head ok in the PR body at 4e6f9533
Conflicts ok none
PR text ok Risk: two-way · T8103 boards (J274, J293, J313, J456, J457). Revert: git revert -m 1 <merge-commit> removes apple,t8103-mcc support from drivers/soc/apple/mcc.c and restores status = "disabled" on mcc in t8103-peripherals.dtsi; remove()/shutdown() restore pre-probe register values and no persistent disk or firmware state is written.

Areas: area:gpu, area:platform

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: FINISH, then merge at a9ffde2a

Blockers:

  1. host-tests CI failure (runs/46128744632): mcc-boot-dma-tests fails to compile against drivers/soc/apple/mcc.c (error: unknown type name 'resource_size_t', 'T8103_DCS_NCHAN' undeclared, implicit declaration of function 'apple_mcc_t8103_enable_lp'). Update tools/asahi/mcc-boot-dma-tests.py so host-tests passes cleanly.
  2. Single-board DT gating (arch/arm64/boot/dts/apple/t8103-j313.dts): &mcc { status = "okay"; }; is enabled only on J313 even though MCC/DCS dynamic clock and power gating is a T8103 SoC block shared across all T8103 boards (t8103.dtsi: J313, J293, J274, J456, J457). Enable it in t8103.dtsi instead of per-board .dts (or document in the commit message why any other T8103 board cannot enable it).

Checked:

  • drivers/soc/apple/mcc.c & mcc-test.c: aperture bounds checks (bcast_res, dcs_res vs min_dcs_size), probe save + enable, resume_noirq re-apply after firmware sleep, remove()/shutdown() restore of pre-probe values, and KUnit apple_mcc_test_t8103_dcs_lp are clean; J313 exact-head row PASS.
  • Checked for Apple material, tool attribution, and private serials: clean; MERGEABLE on main; human Signed-off-by present.
Evidence
  • Head: a9ffde2aee76 (base: main, mergeable: MERGEABLE, +161/-0 across 3 files).
  • Non-blocking nit: in drivers/soc/apple/mcc.c:196, prefer of_device_get_match_data() (hardware match data on apple_mcc_of_match) over an inline of_device_is_compatible(dev->of_node, "apple,t8103-mcc") branch in probe().

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Nov 28, 2026
Use of_device_get_match_data() in apple_mcc_probe() instead of an inline
compatible check, and update tools/asahi/mcc-boot-dma-tests.py with the
T8103_DCS_NCHAN, resource_size_t, and apple_mcc_t8103_enable_lp() stubs
needed by its standalone PM harness.

Signed-off-by: Erik Bourget <[email protected]>
Enable memory-controller@200100000 in shared t8103-peripherals.dtsi
(included by t8103.dtsi) instead of only in t8103-j313.dts so all T8103
boards (J274, J293, J313, J456, J457) share DCS dynamic clock and power
gating.

Signed-off-by: Erik Bourget <[email protected]>
@erikwb
erikwb requested a review from DjDeveloperr as a code owner November 28, 2026 21:57
@erikwb

erikwb commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Addressed both blockers and the match-data nit from the review at a9ffde2a in new commits e771b28f7594 and 269a93f2c856:

  1. host-tests (tools/asahi/mcc-boot-dma-tests.py, e771b28f7594): Added T8103_DCS_NCHAN, resource_size_t, and the apple_mcc_t8103_enable_lp() stub to MPRE so the extracted PM callbacks compile and run cleanly in the standalone host harness (python3 -I tools/asahi/run-host-tests.py --only mcc-boot-dma: 6/6 passed).
  2. Shared T8103 DT enablement (arch/arm64/boot/dts/apple/t8103-peripherals.dtsi and t8103-j313.dts, 269a93f2c856): Dropped status = "disabled" from mcc (memory-controller@200100000) in shared t8103-peripherals.dtsi (included by t8103.dtsi) and removed the J313-only &mcc override from t8103-j313.dts so all T8103 boards (J274, J293, J313, J456, J457) share DCS dynamic clock and power gating.
  3. Match-data nit (drivers/soc/apple/mcc.c, e771b28f7594): Replaced the inline of_device_is_compatible(dev->of_node, "apple,t8103-mcc") branch in apple_mcc_probe() with of_device_get_match_data(dev) using .data = &apple_mcc_t8103_data on apple_mcc_of_match.

Local verification at 269a93f2c856:

  • python3 -I tools/asahi/run-host-tests.py --only mcc-boot-dma: 6/6 passed.
  • ARM64 KUnit apple-mcc: 4/4 passed (including apple_mcc_test_t8103_dcs_lp).
  • make LLVM=1 ARCH=arm64 W=1 drivers/soc/apple/mcc.o (defconfig + arch/arm64/configs/asahi.config): clean (0 warnings).
  • make LLVM=1 ARCH=arm64 CHECK_DTBS=y apple/t8103-j274.dtb apple/t8103-j293.dtb apple/t8103-j313.dtb apple/t8103-j456.dtb apple/t8103-j457.dtb and dt_binding_check DT_SCHEMA_FILES=soc/apple/apple,t8140-mcc.yaml: clean (0 memory-controller@200100000 warnings).
  • ./scripts/checkpatch.pl --strict --git c6bf4998c83f..269a93f2c856: 0 errors, 0 warnings, 0 checks.

Hardware verification (2026-11-28 J313 M1 MacBook Air, T8103, Group A batched boot over main ee36fbdcd1c8):

  • Booted Group A kernel SHA-256 888c041944da96032a9252504c4d5543b906fd98717234eca5e091150af85798, trial Stage 2 image SHA-256 949dc089ed390b7535dd5ef2a6e99975c3026658e58dbd9d17e9b20d2bbb7d71; #3506's changed files were verified byte-identical against standalone #3506 (269a93f2c856) merged onto main (ee36fbdcd1c8).
  • apple-mcc enabled DCS gating on 8 channels (DCS_CTL 0x070a1100 x8 vs baseline 0x070a0100; dcs0..7 0x1f0003ff vs baseline 0x1f0002ff), held across 2 deep S2R cycles (one transient dcs6 sample after the first), 16 MB RAM integrity PASS, DPMS off/on x3 PASS, 0 Oops/BUG/WARN, 0 AVC denials.
  • Baseline ISP capture comparison: on baseline main (ee36fbdcd1c8), ISP capture succeeded after the first deep wake (before J313 became unreachable on the second baseline deep wake), whereas in Group A (888c0419...), ISP capture failed (apple-isp firmware boot -19 / DART fault) after the first deep wake. The failure remains unisolated across the Group A batch.

Open under **Not yet:**:

  • Standalone #3506 (269a93f2c856) MCC isolation boot plus post-wake ISP capture remains the required isolation run once J313 is recovered (the standalone #3506 trial kernel was built and parity-checked, but could not be booted yet because J313 stopped responding on baseline main deep S2R and awaits physical recovery).
  • J313 s2idle hard-resets on baseline main, so only deep S2R with RTC wake was run.
  • Other T8103 boards not in the local lab (J274, J293, J456, J457) and SELinux-enforcing boot.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: FINISH, then merge at 269a93f2

Blockers:

  • Standalone J313 (T8103) isolation & post-deep-wake ISP capture at 269a93f2 (noted under **Not yet:**): The Group A batched boot carrying #3506 hit a post-deep-wake ISP capture failure (-19/DART fault) on J313 where baseline main ee36fbdcd1c8 succeeded. Before merging, a standalone #3506 (269a93f2) boot on J313 needs to verify DCS low-power gating and post-deep-wake ISP capture cleanly in isolation to confirm #3506 did not cause the DART/ISP fault.
  • Hosted CI at 269a93f2: 28 queued CI jobs still need to finish green on this head.

Checked:

  • Audited both new commits (e771b28f, 269a93f2) and the full 4-file diff (+170/-1); zero code blockers found — all prior review items from a9ffde2a are cleanly resolved:
    1. tools/asahi/mcc-boot-dma-tests.py: adds T8103_DCS_NCHAN, resource_size_t, and the apple_mcc_t8103_enable_lp() stub (6/6 passing locally).
    2. arch/arm64/boot/dts/apple/t8103-peripherals.dtsi: drops status = "disabled" on &mcc across all T8103 boards rather than gating per board (CHECK_DTBS=y clean across all 5 T8103 DTBs).
    3. drivers/soc/apple/mcc.c: uses of_device_get_match_data() (apple_mcc_t8103_data), validates bcast_res and dcs_res aperture sizes, enables broadcast LP (0x30000000) and 8-channel DCS gating (0x1100), re-asserts in resume_noirq after firmware sleep, and restores saved pre-probe register values on remove()/shutdown().
  • Verified apple_mcc_test_t8103_dcs_lp KUnit coverage (4/4 passing locally) and PR text (What/Tested/Risk two-way door/Revert/Not yet).
Evidence
  • drivers/soc/apple/mcc.c: apple_mcc_probe_t8103() checks resource_size(bcast_res) >= 0x008 and resource_size(dcs_res) >= 7 * 0x40000 + 0x010 before devm_platform_ioremap_resource(), and apple_mcc_remove() / apple_mcc_shutdown() restore dcs_ctl_saved[] and bcast_lp_saved with wmb().
  • arch/arm64/boot/dts/apple/t8103-peripherals.dtsi: single-line removal of status = "disabled" covers all T8103 boards (J274, J293, J313, J456, J457).

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: FINISH at 269a93f2c856

Blockers: Please isolate the post-wake ISP failure before landing. In the reported J313 comparison capture worked on the first baseline wake and failed with a DART fault after the first batched wake. A standalone candidate and a matched first-wake control are needed to determine whether MCC gating contributes. Hosted validation remains due.

Checked: Verified the shared T8103 enable, hardware match data, and repaired host extract. Ran the unchanged host fixture successfully and confirmed that all five negative controls trip an assertion.

Evidence

The batch shows the intended MCC state and memory-integrity result, but cannot attribute the ISP failure to any one change.

@github-actions github-actions Bot added the area:gpu Area from CODEOWNERS (bot) label Nov 28, 2026
@erikwb

erikwb commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

Completed the matched first-wake standalone #3506 vs baseline main (ee36fbdcd1c8) ISP isolation pair on J313 (M1 MacBook Air, T8103, default cmdline) and updated the PR body while preserving the earlier Group A comparison:

  • Matched baseline main (ee36fbdcd1c8) control (kernel SHA-256 f750b04a..., trial Stage 2 SHA-256 ebf27045..., MCC gating OFF dcs_ctl: 0x070a0100 x8):
    • Pre-sleep ISP capture (v4l2-ctl -d /dev/video0 --stream-mmap=4 --stream-count=90): PASS (4 off-0, 14 on -> 18 off-0, 0 ISP/DART errors).
    • After 1x deep S2R (rtcwake -d rtc1 -m mem -s 15): post-wake 1 ISP capture failed (VIDIOC_STREAMON -1, 1 apple-dart 22c0e8000.iommu translation fault at 0x800b84000, 9 at 0x800b84200, apple-isp -19). Total 29 err+ lines, 1 pre-#3449 failed unit (speakerguardd-v2-switchtest.service).
  • Standalone #3506 (269a93f2c856 merged onto main ee36fbdcd1c8; git diff 269a93f2c856 empty on all 4 PR files before build) (kernel SHA-256 5498ac1f..., DTB SHA-256 d0f5348b..., trial Stage 2 SHA-256 19dd5119...):
    • Pre-sleep: apple-mcc 200100000.memory-controller: DCS dynamic clock and power gating enabled on 8 channels, dcs_ctl: 0x070a1100 x8, dcs0..6 0x1f0003ff, dcs7 0x1000030f, 16 MB RAM integrity PASS, Borealis compute (2603 runs, 0 wrong) and render PASS, pre-sleep ISP capture PASS (4 off-0, 14 on -> 18 off-0).
    • After 1x deep S2R (rtcwake -d rtc1 -m mem -s 15): post-wake readback showed dcs_ctl: 0x070a1100 x8 (dcs0..2,4..7 0x1f0003ff, dcs3 0x1400034f), 3x DPMS PASS (0 bad dmesg lines), 0 AVC denials, and the same post-wake 1 ISP failure (VIDIOC_STREAMON -1, 1 DART fault at 0x800b84000, 9 at 0x800b84200, apple-isp -19). Total 29 err+ lines, all 29 messages matching the baseline control after removing timestamps; same 1 pre-#3449 failed unit.

In this matched first-wake isolation run, the post-deep-wake ISP/DART fault reproduced on unmodified baseline main (ee36fbdcd1c8) and no additional errors appeared in the standalone #3506 run. Ready for re-review once the queued hosted CI jobs finish green.

@github-actions github-actions Bot added merge-conflict Conflicts with the base branch (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 29, 2026
Conflicts:
	drivers/soc/apple/mcc.c

main now describes each MCC with struct apple_mcc_hw match data and
refuses a node without it. Fold the T8103 dcs_lp flag into that struct
(apple_mcc_t8103_hw) in place of apple_mcc_match_data, and branch to the
T8103 probe on hw->dcs_lp.

Signed-off-by: Erik Bourget <[email protected]>
@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Nov 30, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The matched J313 first-wake control reproduces the ISP failure on unmodified main, with the same normalized error count in the standalone candidate. That addresses my earlier isolation request. Keep the current-head build, DT and host checks pending before landing the forward merge.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at 4e6f95332bbb

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: Code reviewed in the earlier App review at this head (6120958897).

Follow-ups (not blocking): current-head build, DT and host checks

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Dec 1, 2026
@erikwb

erikwb commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Current-head (4e6f95332bbb) local build, DT, host, KUnit, style checks, and J313 (T8103) hardware verification pass:

  • J313 (T8103) composite row at 4e6f95332bbb (origin/main 429e7e15f122 + #3335, #3506 4e6f95332bbb, #3508, #3269, #3359, #3289; mcc.o .o/.text byte-identical vs single-PR merge on 429e7e15f122, default cmdline, docked TS5 + DP-2):
    • "apple-mcc: DCS dynamic clock and power gating enabled on 8 channels", DCS_CTL 0x070a1100 x8 and ps_dcs0..7 0x1f0003ff pre-sleep and held after 1x deep S2R (rtcwake -d rtc1 -m mem -s 30, success=1, wake NUB.SPMI0Sw3IRQ); 16 MB RAM canary PASS across deep S2R; eDP-1 DPMS x3 clean; GPU compute/render PASS; 0 failed units, 0 AVC denials, 5 err+ lines identical to default boot (later post-resume ISP v4l2-ctl capture hung in that composite session with cause unassigned).
  • Verified locally at 4e6f95332bbb (and clean merge against origin/main a171afd2123f):
  • python3 -I tools/asahi/run-host-tests.py --only mcc-boot-dma: 6/6 passed
  • ARM64 KUnit apple-mcc: 4/4 passed (apple_mcc_test_partial_enable, apple_mcc_test_quiesce, apple_mcc_test_not_ready, apple_mcc_test_t8103_dcs_lp)
  • make LLVM=1 ARCH=arm64 W=1 drivers/soc/apple/mcc.o and full arm64 kernel/DTB build (7.3.0+): clean (0 warnings in drivers/soc/apple/mcc.c)
  • dt_binding_check DT_SCHEMA_FILES=soc/apple/apple,t8140-mcc.yaml and CHECK_DTBS=y across all 5 T8103 DTBs (t8103-j274.dtb, t8103-j293.dtb, t8103-j313.dtb, t8103-j456.dtb, t8103-j457.dtb): clean (0 memory-controller@200100000 or apple,t8140-mcc warnings)
  • ./scripts/checkpatch.pl --strict on dbfbced70b31..4e6f95332bbb: 0 errors, 0 warnings, 0 checks

On hosted CI at 4e6f95332bbb, apple-build, dt-checks, host-tests, kunit, rust-build, source, pr-text, DWC3/ATC builtin-no-atc, DWC3/ATC modular-no-atc, KUnit ane-boot, KUnit ane-pm, and KUnit dcp-topology have passed; the remaining KUnit jobs are queued/running and DWC3/ATC builtin-modular-atc was cancelled.

@github-actions github-actions Bot removed ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) labels Dec 1, 2026

@DjDeveloperr DjDeveloperr 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.

The T8103 path validates both MMIO apertures before writing, saves the original values for teardown, and reapplies the bit masks after firmware sleep. The J313 candidate exercises those registers, deep resume and the memory canary. Related Apple build, DT and host checks passed.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Dec 1, 2026
@DjDeveloperr
DjDeveloperr merged commit 0c3eafd into main Dec 1, 2026
53 of 96 checks passed
@DjDeveloperr
DjDeveloperr deleted the feat/t8103-mcc-dcs-lp branch December 1, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m1 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants