Skip to content

Revert "drm/apple: dpavservep: admit the AFKV2 AV service on the classic DPAV endpoint" (M4 Air resets on DPMS off) - #2857

Merged
RyanTheTide merged 2 commits into
integration/aurorafrom
j713-8/revert-2783-avserv
Nov 22, 2026
Merged

RyanTheTide merged 2 commits into
integration/aurorafrom
j713-8/revert-2783-avserv

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Since #2783 the M4 MacBook Air (J713) resets when its displays are blanked while it drives an external monitor. A DPMS off (GNOME's "screen off", Mutter PowerSaveMode 3) brings the Mac down about 0.6 s later. Nothing reaches the kernel log or a network console, and the Mac comes back on its default boot. The lab J713 default kernel does this on the first DPMS off.

Change

Revert 78e59bd ("drm/apple: dpavservep: admit the AFKV2 AV service on the classic DPAV endpoint"), so the Airs' external DCPs refuse the AV service on endpoint 0x28 again, as before #2783. The other commit of #2783 (HDR on Type-C connectors unless a pipeline is native26) stays.

What this costs: external monitors on the Airs keep their modes (from the firmware's catalogue), but lose the monitor name and EDID colour data again until the AV service is used safely across a link release.

Testing

On the J713 (macOS 27.2 stub), with the MSI monitor on DP-1, default kernel command line and unchanged Stage 2, one DPMS off/on (PowerSaveMode 3, 4 s, 0) per cycle:

kernel AV service on EP 0x28 DPMS off/on
lab default (integration tip + open heads, with 78e59bd) admitted reset on the first off
same, minus 78e59bd only refused (-ENODEV) 3/3, no reset
same, minus 78e59bd and the two EDID-publication commits of #2166/#2757 refused 3/3, no reset
previous default (before all three) refused 10/10

With 78e59bd reverted, both outputs are off while blanked and back after each cycle, with 0 DART faults, 0 oops and 0 AVCs. Host tests: run-host-tests.py --only apple-dcp passes, and dpavservep.o builds clean with W=1. KUnit apple-dcpavserv* (qemu arm64, LLVM=1) passes 43/43 at c5e25e0, which also flips the three v2 ep 0x28 admit rows of the identity suite to refused; on the revert commit alone those three rows fail (40/43).

Still to run

  • M3 Air (J615): no external monitor was attached tonight, so I don't know yet whether it resets the same way. Its EDID name goes away with this revert too.
  • The proper fix: keep the AV service from being used while the external processor releases the link, then bring 78e59bd back with DPMS and sleep rows on both Airs.
Reviewer / agent detail
  • Sequence on the network console before the reset: DPMS off; the external processor's firmware powers its display blocks down and drops HPD; the kernel logs dcp_dptx_disconnect(port=0); the hotplug mode probe runs (using firmware-derived EDID metadata for connection 3); then nothing. The connector's EDID is invalidated when the service closes, so the next probe can try dcpavserv_copy_edid() through the closing service. That is the likely trigger but not proven, and the reset has no log of its own.
  • The firmware announces a new AV service instance (interface-id 1, then 5, 9, 13, ...) after every DPMS on.
  • Lab evidence (our own captures, not tainted): traces/display/20261123-j713-dpms-reset/ (netconsole log, the three A/B rows, restore checks).
  • Revert of 78e59bd, plus c5e25e0: the apple-dcpavserv-identity KUnit rows (from drm/apple: dpavservep: test which AV service announcements are admitted #2820) now expect AFKV2 on 0x28 to be refused; flip them back together with the admission. The edid.py host regression for the AFKV2-on-0x28 case goes with the revert.

Assisted-by: LLM (Claude:Opus 5.5)

…sic DPAV endpoint"

This reverts commit 78e59bd.

With the external DCP's AV service admitted, the M4 MacBook Air (J713,
macOS 27.2 stub) resets about 0.6 s after a DPMS off while it drives an
external monitor. The last kernel lines before the reset are the
external processor releasing the DP link (dcp_dptx_disconnect) and the
hotplug mode probe that follows. Nothing else reaches the kernel log or
a network console, and the Mac comes back on its default boot. The
likely trigger is a request to the AV service while the firmware is
closing it with the link, but that is not proven yet.

On the J713 default kernel the first DPMS off resets the Mac. The same
kernel with only this commit reverted, so the service is refused again,
completes 3 of 3 DPMS off/on cycles with the monitor on. Both outputs
are off while blanked and back after, with no DART faults, oopses or
AVCs.

Revert it until the AV service is used safely across a link release,
proven with DPMS and sleep rows on both Airs. External monitors on the
Airs keep their modes from the firmware's catalogue; they lose the
monitor name and EDID colour data again.

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

Copy link
Copy Markdown
Contributor Author

Review at 311ccad.

The revert itself is exact: its diff is the inverse of 78e59bd in both files, and backing out the endpoint-0x28 admission is the right call while DPMS off resets the J713. One thing is missing:

  1. The dpavservep-identity-test.c KUnit suite from drm/apple: dpavservep: test which AV service announcements are admitted #2820 (merged, in this branch's base) still expects the reverted rule. Three rows at lines 64-69 ("v2 ep 0x28: DP13 unit 0", "v2 ep 0x28: DP2HDMI unit 0", "v2 ep 0x28: unit 0, channel at u16 max") expect true, and after this revert dcpavserv_identity() returns false for all three, which is exactly the "old function fails the three v2 ep 0x28 admit rows" case drm/apple: dpavservep: test which AV service announcements are admitted #2820 described. No workflow runs CONFIG_DRM_APPLE_DISPLAY_KUNIT_TEST, so CI won't show it. Please flip those three to false (and the section comment above them) in this PR, so the suite matches the code and the rows can be flipped back together with 78e59bd later.

Rows: the J713 table is enough for the revert. The J615 external-monitor DPMS row is a useful follow-up, as the body says.

…e refused

The revert of 78e59bd ("drm/apple: dpavservep: admit the AFKV2 AV
service on the classic DPAV endpoint") makes dcpavserv_identity() refuse
the AV service on endpoint 0x28 over the AFKV2 wire again, but the
apple-dcpavserv-identity suite still expected three of those rows to be
admitted, so it failed 40/43.

Expect them to be refused, and say why in the section comment. They can
flip back together with the admission once the service is safe to use
across a link release.

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

Copy link
Copy Markdown
Contributor Author

Fixed in c5e25e0 (fast-forward on 311ccad): the three v2 ep 0x28 admit rows in dpavservep-identity-test.c now expect false, and the section comment says why. KUnit apple-dcpavserv* on qemu arm64 (LLVM=1, the #2820 kunitconfig): 43/43 at c5e25e0; on 311ccad alone the same three rows fail (40/43).

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Executed pass at c5e25e0 (the revert 311ccad plus the KUnit fix).

The revert and the test fix check out. apple-dcpavserv* KUnit on qemu arm64 (LLVM=1): 43/43 at c5e25e0. At 311ccad alone the three v2 ep 0x28 ... unit 0 admit rows fail (27/30 of the identity suite), and flipping only those three gives 30/30, so the new commit changes exactly what the revert broke and nothing else. The apple-dcp host edid group passes 4/4 at 311ccad. The diff is the exact inverse of 78e59bd in both files.

One thing for whoever decides the merge order: this conflicts with #2853, and the two do not work together as they stand.

Suggested order: land this revert (it fixes a production reset), and have #2853 hold its MCDP admission until the AV service is safe across a link release, or show a DPMS off/on row on the mini (and one with an MCDP adapter on the J713) before it re-adds ep 0x28.

Verdict at c5e25e0: no blocker in this PR.

Commands and logs
tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=<DRM_APPLE + DRM_APPLE_DISPLAY_KUNIT_TEST> 'apple-dcpavserv*'
  311ccad5:                    apple-dcpavserv-identity 27/30 (FAILED: "v2 ep 0x28: DP13 unit 0", "v2 ep 0x28: DP2HDMI unit 0", "v2 ep 0x28: unit 0, channel at u16 max")
  311ccad5 + those 3 rows=false: 30/30
  c5e25e09:                    43/43
tools/testing/selftests/drivers/gpu/apple-dcp/run.py --group edid (311ccad5): ok 1-4
git merge-tree --write-tree c5e25e09 638611e1: CONFLICT (content) drivers/gpu/drm/apple/epic/dpavservep.c

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

Formal adversarial §1–§6 pre-PR checklist review at verified live head c5e25e0925351be6efedb961f44674d0af5562c5: APPROVE.

Verification Summary

  • Clean revert & KUnit alignment: 311ccad5 (Revert "drm/apple: dpavservep: admit the AFKV2 AV service on the classic DPAV endpoint") is the exact inverse of 78e59bdf4751 in both drivers/gpu/drm/apple/epic/dpavservep.c and tools/testing/selftests/drivers/gpu/apple-dcp/edid.py, restoring pre-78e59bdf behavior while keeping the other commit of #2783 intact. c5e25e09 flips only the three v2 ep 0x28 unit-0 admit rows in drivers/gpu/drm/apple/epic/dpavservep-identity-test.c (added in merged #2820) back to false with an explanatory comment.
  • Follow-up dependency check: Comparing 78e59bdf...integration/aurora (95a13cf6), no other merged commit depends on 78e59bdf (only #2820, updated here).
  • Merge-order note for merge train: Open PR #2853 (638611e1, M2 Mac mini HDMI on 27.2) conflicts in dcpavserv_identity() and relies on ep 0x28 unit-0 AFKV2 admission; landing #2857 first is the right call to fix the production J713 DPMS-off reset, and #2853 will need to rebase/hold ep 0x28 admission until link-release teardown is safe.
  • CI: Host tests / host-tests is SUCCESS on c5e25e09 (mergeable: MERGEABLE, mergeStateStatus: CLEAN).

Pre-PR Checklist (§1–§6)

  • §1 (No model gating): Pass — clean revert of ep 0x28 AFKV2 admission with no chip/SoC/board/firmware gates introduced.
  • §2 (Production-ready, no hacks): Pass — default kernel command line, no new parameters, delays, or workarounds.
  • §3 (Safety): Pass — eliminates the ~0.6 s hard reset on J713 DPMS off while preserving external monitor modes from the firmware catalogue.
  • §4 (Clean-room & attribution): Pass — both commits carry human author/committer (Ryan Murray <ryan@aurorasilicon.org>) and human Signed-off-by: only, with zero agent trailers in commit messages; PR body includes Assisted-by:.
  • §5 (Evidence): Pass — clean same-machine J713 A/B table on default cmdline & unchanged Stage 2 (reset on 1st DPMS off with 78e59bdf vs 3/3 DPMS off/on without 78e59bdf, 0 DART faults, 0 oops, 0 AVCs), plus KUnit apple-dcpavserv* 43/43 at c5e25e09 (vs 40/43 at 311ccad5 alone) and green host-tests CI. J615 follow-up transparently noted.
  • §6 (Naming): Pass.

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide
RyanTheTide merged commit 110861f into integration/aurora Nov 22, 2026
1 check passed
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.

2 participants