Skip to content

drm/apple: T6050: refuse deep sleep at .prepare where the firmware 27 display sleep is not known - #2070

Open
rolotrealanis98 wants to merge 9 commits into
aurora-silicon:mainfrom
rolotrealanis98:pr/t6050-deep-sleep-guards
Open

rolotrealanis98 wants to merge 9 commits into
aurora-silicon:mainfrom
rolotrealanis98:pr/t6050-deep-sleep-guards

Conversation

@rolotrealanis98

@rolotrealanis98 rolotrealanis98 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

What: refuse a T6050 deep sleep at .prepare when the build's firmware 27 method table has no ID for one of the display sleep's calls, and refuse to start an endpoint that already runs but is not tracked for the sleep (-EPROTO) instead of starting it a second time.
Tested: J716s (firmware 27.3) at 7987e8f, row in the comments; KUnit, host tests and checkpatch --strict pass at that SHA (Testing below).
Risk: two-way door. T6050 DCP/DCPEXT on firmware 27 under the T6050 deep sleep. With main merged in (#2187), 27.0, its J714s copy and 27.2 keep their deep sleep; a table without an ID for a sleep call (27.3 today) is refused, and main already keeps such a processor out at admission, so the .prepare check is a consistency guard. The untracked-endpoint backstop is what this adds on top of main.
Not yet: a J714s 27.0 or 27.2 deep sleep at this head (I have no J714s).

Problem

A T6050 deep sleep (mem_sleep=deep) runs the firmware 27 display sleep on every DCP and DCPEXT admitted to the firmware 27 sleep transport (dcp_v27_sleep_selected()). Before #2187 that sleep sent its calls by their firmware 27.0 IDs, and admission did not look at the build's method table. A J714s on 27.2 or 27.3 was admitted, and its table gives several of those IDs to other methods or to none, so the sleep would have sent them anyway.

How it shows up, from the J716s (16-inch M5 Pro, firmware 27.3) on the base this was first written for, before #2124 decided admission per processor: a pm_test=devices deep sleep crashed the DCP in the device suspend. None of the J716s's endpoints were tracked for the sleep (sleep_v27_ep), so the sleep started the already running system endpoint 0x20 a second time. The firmware asserted, the call timed out after 1 s, the suspend returned -110, and the display stayed dark until a reboot.

Change

One commit, decided by the method table rather than by the board:

  • iomfb_v27_sleep_missing_method() names the first call of the display sleep that the selected table (dcp->v27_methods) has no ID for, NULL exactly when main's iomfb_v27_sleep_methods_complete() is true. The 27.0 table, its J714s copy and the 27.2 table carry them; the 27.3 table does not.
  • dcp_platform_prepare() refuses a firmware-driven sleep with -EOPNOTSUPP on a processor the display sleep would run on whose table does not carry it, before any device suspends, and logs the build and the first missing call. s2idle never reaches this check.
  • Two backstops: dcp_v27_sleep_prepare() refuses the same way, and dcp_v27_sleep_endpoints_open() returns -EPROTO rather than start an endpoint that already runs but is not tracked for the sleep. On an admitted processor every endpoint is tracked, so it does not trigger there.

Affected: T6050 DCP/DCPEXT on firmware 27 under the T6050 sleep. The J714s and the J716c on 27.0 and a J714s on 27.2 keep their deep sleep; a processor on 27.3 is refused (and on main is not admitted in the first place). No other SoC reaches this code.

No board or firmware-version check is added: the decision comes from the method table the driver already selects for the build, the same data iomfb_v27_missing_method() uses to decide whether a build may start at all. A build is admitted as soon as its table has an ID for every call the sleep sends.

Interaction with #2187 (main merged in at 7987e8f): that change makes the sleep send each build's own IDs and admits processors by iomfb_v27_sleep_methods_complete(). The merge keeps main's iomfb_v27_sleep_methods[] list and defines iomfb_v27_sleep_missing_method() over it, so the .prepare and dcp_v27_sleep_prepare() checks apply the same rule as admission: 27.2 stays admitted and 27.3 stays refused. The untracked-endpoint backstop is independent of it.

Testing

At 7987e8f: KUnit (display.kunitconfig, arm64, LLVM): 169 run, 168 passed, 1 skipped (needs CONFIG_UCLAMP_TASK), including dcp_firmware_27_sleep_methods. Host tests (tools/asahi/run-host-tests.py): 696/696, including display-sleep-merge-tests with the prepare-ignore-known negative control. checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks. drivers/gpu/drm/apple/ builds with W=1, no warnings, with CONFIG_APPLE_SOC_SLEEP on and off.

Not yet run

  • J714s on 27.0 or 27.2, default command line: a deep sleep still enters and resumes with the panel back, no refusal line; 0 AVC / 0 failed units / 0 new kernel errors.
  • The refusal itself on hardware: on main a processor whose table lacks a sleep call is not admitted, so the .prepare check cannot fire on any board today; the J716s row shows the head boots and s2idle is unaffected.
Related, not in this PR: the boot timer write on the J716s

On the J716s, t6050_sleep_boot_timer_off() oopses: its MSR S3_4_C15_C2_7 (SYS_APL_AGT_CTL_EL02) is an undefined instruction there (ESR 0x02000000, in the bound worker). The oops kills CPU0's high-priority kworker, so block I/O completions stop and the root file system hangs a couple of minutes later. Only the J714s and the J716c are admitted to the T6050 sleep today, so nothing here reaches that code on another board. Noting it for whichever board is admitted next.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T09:57:49.209727Z df8aaf5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@axboe

axboe commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

A data point for the 27.2 side of this, from the K116s (16" M5 Pro, 27.2): the firmware 27 display sleep does run to completion there, so 27.2 need not stay in the "not known" set. What it took, on top of the J714s 27.0 path:

  • Tags: A401 and up move by +50 on 27.2 (A484 → A534, A500 → A550, A442 → A492); A115 is unchanged. A492 rejects the 0xaa filler as index count and block size; zeros are accepted.
  • Secure mailbox: the internal DCP only acknowledges the IOP power state after /arm-io/dcp-exclave-mailbox is handshaken at bind and AP-idled between the main mailbox's AP and IOP idle. Without it the suspend times out as described here.
  • External engines: the four DCPEXT hand off and sleep with the same tags once the loader hands them over.

Details and logs are in #2075, the experiment branch is linked there. I have no 27.3 machine, so I can't say whether its tags follow the same shift.

@rolotrealanis98

Copy link
Copy Markdown
Contributor Author

Thanks, that's useful. I'd like to keep this PR as the guard and admit 27.2 separately:

  • This PR stops the crash for any T6050 firmware 27 DCP whose sleep calls aren't known. It stays needed for 27.3 and for anything newer.
  • 27.2 can leave the "not known" set when the work in T6050 K116s (27.2): deep sleep entry completes, the SoC does not sleep; DCP secure mailbox and DCPEXT handoff needed #2075 lands: the +50 tag shift, the zeroed A492 fields, and the dcp-exclave-mailbox handshake and AP idle. That should be one change. Admitting 27.2 without the secure mailbox would just move the failure to the IOP-idle timeout you describe. When you open it, I'll narrow v27_sleep_known to match, or rebase onto it, whichever you prefer.
  • 27.3: this J716s is on 27.3, so I can check whether the tags follow the same +50 shift there. That will be after Saturday (2026-11-21), when I'm back at the hardware. I'm also moving the J716s to the 27.2 stub for aura#274, so I can try your branch on a second 27.2 board if you push it.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Blockers: 2.

The fail-closed direction is right: refusing at .prepare (drivers/gpu/drm/apple/dcp.c:7528) stops the deep sleep before any device suspends, and the untracked-endpoint backstop at drivers/gpu/drm/apple/dcp-v27-sleep.inc:968 is a good generic check.

  1. The commit has no Signed-off-by, only agent trailers (a Co-Authored-By and a session link). Re-sign it with your own Signed-off-by and drop both trailers.
  2. dcp-v27-sleep.inc:408-419 (the comment above dcp_v27_sleep_known()) and the commit message quote the firmware's own assertion source file and line and its internal method names. Those are strings from the firmware. Describe the failure in our terms instead ("the firmware asserted on a second endpoint start and the call timed out").
  3. Not a blocker, but it shapes the next step. v27_sleep_known is set only inside the v27_j714s branch (dcp.c:6682), so whether the sleep is "known" is decided by board plus firmware version. The driver already keeps one method table per build (iomfb_v27_methods()) and checks a table for missing IDs (iomfb_v27_missing_method()). Set v27_sleep_known when the selected table has an ID for every method the sleep sends. Then 27.2, and 27.3 once its IDs are in its table, are admitted by data, not by a board check.
  4. This conflicts with drm/apple: J716c external displays and display sleep on firmware 27.2 #2187, which admits the J716c on 27.2 to the firmware 27 sleep transport (dcp_v27_sleep_transport_supported()) and reports a working 27.2 deep sleep there. With this PR that same sleep is refused at .prepare, because the J716c never sets v27_sleep_known. Point 3 fixes this if the 27.2 table carries the sleep's IDs; otherwise rebase onto drm/apple: J716c external displays and display sleep on firmware 27.2 #2187 and say which one wins.
  5. The branch no longer merges cleanly with integration/aurora; it needs a rebase.

HW row: J714s on 27.0 with this branch, default cmdline: a deep sleep still enters and resumes with the panel back (no refusal line); J716s on 27.3: the refusal line, no device suspended, s2idle unaffected; 0 AVC / 0 failed units / 0 new kernel errors on both.

Nit: the PR body ends with "Generated with Claude Code" and a session link; the last line should be Assisted-by: LLM (<Vendor>:<Model>).

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

This no longer applies to the current integration/aurora tip 110861f. Since it was opened, #2124 (fd5cc59) admitted the J716c on 27.0.0 to the firmware 27 sleep through a new v27_sleep_transport flag, and dcp_v27_sleep_selected() now requires that flag. A J716s on 27.3 therefore no longer takes the v27 sleep at all, but a J714s on 27.2 or 27.3 still does. Rebased as is, the J716c's merged deep sleep would be refused at .prepare, because v27_sleep_known is only set for the J714s 27.0 table. @rolotrealanis98 could you rebase and derive v27_sleep_known from the selected method table carrying every ID the sleep sends, as suggested in the 11-21 review? The comment and commit message should also describe the firmware assertion in our own words rather than quoting its source file, line and method names.

@github-actions github-actions Bot added area:display Area from CODEOWNERS (bot) merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026
… display sleep is not known

A T6050 deep sleep runs the firmware 27 display sleep on every DCP and
DCPEXT admitted to its transport (dcp_v27_sleep_selected()). That sleep
sends its calls by their firmware 27.0 IDs, and admission does not look
at the build's method table: a J714s on 27.2, whose table gives several
of those IDs to other methods or to none, takes the sleep and sends them
anyway.

On a J716s (27.3), before admission to the transport was decided per
processor, this sleep left the display dark until a reboot. None of its
endpoints were tracked for the sleep, so the sleep started the running
system endpoint a second time; the firmware asserted, the call timed out
after 1 s and the suspend failed with -ETIMEDOUT.

Refuse such a deep sleep where it starts, decided by the method table
rather than by the board:

- iomfb_v27_sleep_missing_method() names the first call of the display
  sleep that a build's table does not carry under the ID the sleep sends,
  NULL if it carries them all. The 27.0 table and its J714s copy carry
  them; the 27.2 and 27.3 tables do not.
- dcp_platform_prepare() refuses a firmware-driven (deep) sleep with
  -EOPNOTSUPP, before any device suspends, on a processor the display
  sleep would run on whose table does not carry it, and logs one line
  with the build and the first call it lacks. s2idle does not come here
  (no pm_suspend_via_firmware()).
- dcp_v27_sleep_prepare() refuses the same way if it is ever reached.
- dcp_v27_sleep_endpoints_open() refuses with -EPROTO when a ring already
  runs on an endpoint that is not tracked for the sleep, instead of
  starting that endpoint again. Every endpoint of an admitted processor
  is tracked, so it does not trigger there.

The J714s and the J716c on 27.0 keep their deep sleep. Another build is
admitted as soon as its table carries the sleep's calls under the IDs
the sleep sends; once the sleep sends each call by the build's own ID,
the check becomes whether the table has an ID for each call.

The apple-dcp-firmware KUnit suite checks the tables against the sleep's
calls, and display-sleep-merge-tests checks the refusal at .prepare.

Signed-off-by: rolotrealanis98 <122947376+rolotrealanis98@users.noreply.github.com>

Signed-off-by: Rolando Trevino <122947376+rolotrealanis98@users.noreply.github.com>
@rolotrealanis98
rolotrealanis98 force-pushed the pr/t6050-deep-sleep-guards branch from df8aaf5 to f0d63f6 Compare November 24, 2026 15:14
@rolotrealanis98
rolotrealanis98 requested review from a team and DjDeveloperr as code owners November 24, 2026 15:14
@rolotrealanis98

Copy link
Copy Markdown
Contributor Author

@RyanTheTide thanks, reworked and rebased on main (83950d0), one commit:

  1. Re-signed with my own Signed-off-by; the Co-Authored-By and session-link trailers are gone.
  2. The code comment and commit message describe the failure in our terms (the sleep started an already running endpoint again, the firmware asserted, the call timed out), with no firmware file, line or method names.
  3. The PR body follows the template (What / Tested / Risk / Not yet) and carries no attribution line, per the rulebook.
  4. v27_sleep_known is gone. dcp_v27_sleep_known() asks the selected method table, with no board check: iomfb_v27_sleep_missing_method() checks that the table carries every call the sleep sends under the ID it sends. The J714s and the J716c on 27.0 keep their deep sleep; a J714s on 27.2 or 27.3 is refused at .prepare. No board or firmware-version check is added.

At f0d63f6: KUnit display suites 147/148 (1 skipped, none failed), host tests 505/505, checkpatch --strict clean, drivers/gpu/drm/apple/ builds with W=1 and no warnings with CONFIG_APPLE_SOC_SLEEP on and off.

On #2187: today the sleep sends 27.0 IDs, so a 27.2 table is refused here. Whichever lands second rebases. If #2187 lands first, I'll switch the .prepare and dcp_v27_sleep_prepare() checks to its iomfb_v27_sleep_methods_complete(), so 27.2 stays admitted and 27.3 stays refused; the untracked-endpoint backstop stays.

No hardware row yet at this head. On main the J716s no longer takes this sleep, so it can only show its deep sleep is unaffected; the refusal itself needs a J714s on 27.2 or 27.3. I don't have a J714s, so a run of the J714s 27.0 row would be very welcome.

@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) and removed merge-conflict Conflicts with the base branch (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Merge readiness at 696ad13a: not ready yet

Check Detail
CI at head ok 9 checks passed
Review no approved by DjDeveloperr, but GitHub does not count it yet (code owner from Core or Omarchy Mac needed, or approval went stale)
Requested changes ok none
Hardware row at head no no line with the head SHA 696ad13a, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · . T6050 DCP/DCPEXT on firmware 27 under the T6050 deep sleep. With main merged in (#2187), 27.0, its J714s copy and 27.2 keep their deep sleep; a table without an ID for a sleep call (27.3 today) is refused, and main already keeps such a processor out at admission, so the .prepare check is a consistency guard. The untracked-endpoint backstop is what this adds on top of main.

Areas: area:display, area:gpu

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

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Dec 1, 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.

Verdict: MERGE at 55c9433c3470

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: - Merge resolution at 55c9433c (drivers/gpu/drm/apple/dcp.c, tools/asahi/display-sleep-merge-tests.py): dcp_platform_prepare() cleanly keeps main's sleep_cold_stopped early return ahead of dcp_v27_sleep_known(dcp) so a cold-stopped display processor is neither invalidated nor refused; display-sleep-merge-tests.py exercises that exact sleep_cold_stopped && !v27_known case across all 23 compiled runs.

  • Preflight & method-table guards (dcp-v27-sleep.inc, iomfb_v27.c, dcp-firmware-test.c): dcp_v27_sleep_endpoints_check() validates the full v27_sleep_endpoints set before initializing or starting any endpoint (returning -ENODEV/-EPROTO without side effects), and iomfb_v27_sleep_missing_method() mirrors iomfb_v27_sleep_methods_complete() with KUnit coverage (dcp_firmware_27_sleep_methods).

Follow-ups (not blocking): fork CI approval, T6050 27.x deep-sleep/display-resume row

@github-actions github-actions Bot added the merge-conflict Conflicts with the base branch (bot) label Dec 1, 2026
Main's dcp_platform_prepare() now runs dcp_v27_dpms_prepare() before the
deep-sleep path; for a deep sleep it can power the display pipe on and
set v27_dpms_pm_suspend, which only .complete undoes, and a device whose
.prepare fails gets no .complete. The refusal of a deep sleep whose
display sleep the build's table does not carry therefore comes first,
then main's DPMS prepare, then the deep-sleep invalidation. The
merge-boundary test counts the DPMS prepare and checks that a refused
sleep never reaches it.

Signed-off-by: Rolando Trevino <122947376+rolotrealanis98@users.noreply.github.com>
@rolotrealanis98

Copy link
Copy Markdown
Contributor Author

Merged main in again (68895bc, normal push). Main's dcp_platform_prepare() now calls dcp_v27_dpms_prepare() before the deep-sleep path; for a deep sleep it can power the display pipe on and set v27_dpms_pm_suspend, which only .complete undoes, and a device whose .prepare fails gets no .complete. So the refusal of a deep sleep the build's table does not carry now comes first, then main's DPMS prepare, then the deep-sleep invalidation. tools/asahi/display-sleep-merge-tests.py counts the DPMS prepare and checks that a refused sleep never reaches it (with the two calls swapped the test fails); 23 compiled runs pass. dcp.o builds clean with W=1.

J716s row at 68895bc:

J716s (MacBook Pro 16-inch, M5 Pro, firmware 27.3), test kernel 7.3.0-g0c0e8adb3eb0 = the J716s daily kernel
with this PR at 68895bc7 (git diff <main base>..68895bc7 for drivers/gpu/drm/apple applied, the daily's own copy
reverted; that base has no DPMS prepare, so dcp_platform_prepare() is the refusal + invalidation), booted through aura:
- boot: PASS, slot primary, 0 failed units, internal panel 3456x2234@120 and HDMI 2560x1600@165 up, 0 DCP crash/timeout lines,
  0 WARNING/BUG/Oops
- deep-sleep refusal lines at boot: 0; /sys/power/mem_sleep: [s2idle]
- s2idle (pm_test=devices): suspend_stats success 1 / fail 0, resumed, both displays modeset back, network back, 18 CPUs online
- deep: not offered on this chain; the J716s on 27.3 is not admitted to the firmware 27 sleep transport, so .prepare's refusal
  is the expected outcome there and its host test covers it

@github-actions github-actions Bot removed ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) labels Dec 1, 2026
DjDeveloperr
DjDeveloperr previously approved these changes Dec 2, 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.

Reads right. The .prepare refusal is decided by the selected method table, and it comes before main's DPMS prepare, which a failed .prepare would never undo. The endpoint set is checked whole before anything starts, and the merge test fails with the two calls swapped. One nit, not blocking: dcp_platform_prepare() calls dcp_v27_sleep_known() twice on the refusal path, so the warning is logged twice; keep its return value in a local and return that. I approved the fork CI runs for this head. Left before merge: green CI here and a J714s deep sleep at this head on a table that carries the sleep (27.0 or 27.2): no refusal line, the display back after wake, 0 DCP crashes or timeouts. The J716s row covers the refusal side.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 2, 2026
Brings the branch up to main 5a870d0 so the host tests run against one tree; no conflicts, nothing here changes in the merge.

Signed-off-by: Rolando Trevino <122947376+rolotrealanis98@users.noreply.github.com>
dcp_platform_prepare() called dcp_v27_sleep_known() twice on the
refusal path, so the refusal's warning was logged twice. Keep its
result and return that.

The merge-boundary test counts the calls and checks the refusal asks
once; two new mutations (asking twice, and the DPMS prepare moved ahead
of the refusal) fail as expected.

Signed-off-by: Rolando Trevino <122947376+rolotrealanis98@users.noreply.github.com>
@rolotrealanis98

Copy link
Copy Markdown
Contributor Author

Pushed d7448bc (normal push):

  • ed6119314a70 merges main 5a870d0. The host-tests failure at 68895bc was main's own tests (g17 output fence / render-owed stamp, brcmf PS nap, ave recovery) failing to compile against the branch's day-old base; this PR touches none of those files.
  • d7448bcbc141 takes the nit: dcp_platform_prepare() keeps dcp_v27_sleep_known()'s result in ret and returns it, so the refusal is asked and logged once. display-sleep-merge-tests.py now counts the calls and has two more mutations (asking twice, and main's DPMS prepare moved ahead of the refusal); both fail as expected, 25 compiled runs pass.
  • dcp.o with W=1: 0 warnings.

DjDeveloperr
DjDeveloperr previously approved these changes Dec 2, 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 merge-up preserves the DCP endpoint checks. The new prepare path evaluates the sleep table once and returns the saved refusal before DPMS prepare. I ran all 25 display-sleep checks on the merge with main 6162827, including both new negative controls. Merge still awaits the J714s physical deep-sleep and display-resume result at this head.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) merge-conflict Conflicts with the base branch (bot) and removed ci-failing A check failed at the PR head (bot) labels Dec 2, 2026
One conflict, in the display-sleep merge test: main added the ext272
pointer to the mocked struct apple_dcp and this branch added v27_known;
the mock now carries both. dcp.c, dcp-v27-sleep.inc, iomfb.h,
iomfb_v27.c and dcp-firmware-test.c merged without conflicts.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Merged main 06fceca into the branch at 15b496b8 with a normal push, so this doesn't wait on another merge-up. One conflict, in the mocked struct apple_dcp in tools/asahi/display-sleep-merge-tests.py: main added the ext272 pointer and this branch added v27_known, so the mock now carries both. dcp.c, dcp-v27-sleep.inc, iomfb.h, iomfb_v27.c and dcp-firmware-test.c merged without conflicts.

Checks on the merged tree:

  • display-sleep-merge-tests.py: PASS, 25 compiled merge-boundary runs, including the runtime controls;
  • dcp.o, iomfb.o and iomfb_v27.o build for arm64 (clang, kernel flags plus the W=1 warning set) with 0 warnings and 0 errors, the same as main.

The merge clears the 12-02 approval. Still needed: a quick re-review of the merge, and the T6050 deep-sleep and display-resume row at 15b496b8.

@github-actions github-actions Bot added needs-review No approving review from Core or Omarchy Mac yet (bot) and removed merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) labels Dec 2, 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.

Re-checked the forward merge at 15b496b. The mock retains both ext272 and v27_known. On the GitHub merge candidate 082fe65 against main 87c01c2, git diff --check and all 25 compiled display-sleep boundary runs passed, including the runtime controls. The supported-table T6050 deep-sleep and display-resume row is still pending.

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

Verdict: MERGE at 696ad13a, after the hardware row below.
Blockers: none.
Checked: the forward merge and the change itself. At 15b496b8 the only conflict was the mock struct apple_dcp in tools/asahi/display-sleep-merge-tests.py. It now carries both main's ext272 and this branch's v27_known, which is right; every other file matches a clean merge. The host-tests failure at 15b496b8 was only centauri-scan-tests (996/998 passed). That failure came from main's own harness at that point, and main has since fixed it (#3987). This PR touches none of its files. I merged current main into the branch server-side (696ad13a). That merge matches a clean merge, this PR's dcp.c hunks are unchanged, and display-sleep-merge-tests.py passes all 25 runs there. In dcp_platform_prepare(), the refusal still comes after main's ext272 and cold-stopped early returns and before the DPMS prepare. It follows the same method table that admission uses, and the endpoint set is checked whole before any endpoint starts. No Apple material, no board or firmware gate, no new parameter.

Still owed before merge: a J714s deep sleep and display resume at this head, on firmware whose table carries the display sleep (27.0 or 27.2): no refusal line, the panel comes back, 0 AVC, 0 failed units, 0 new kernel errors.

Evidence
  • git merge-tree --write-tree of each merge's parents: 696ad13a and ed611931 match exactly, and 15b496b8 differs only in the conflicted test file. The earlier merges were reviewed at their own heads. I read the net diff against main.
  • Main's dcp.c change since 06fceca4 (#3893) merges cleanly with this PR's hunk. Comparing the diff against main before and after the merge shows the same lines.
  • python3 tools/asahi/display-sleep-merge-tests.py on the 696ad13a tree: PASS: 25 compiled merge-boundary runs, including runtime controls.

@github-actions github-actions Bot added the needs-hw-row No hardware row at the PR head (bot) label Dec 2, 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.

Verdict: MERGE at 696ad13

Checked: The latest merge preserves the selected firmware method table as the source of truth and checks it before DPMS prepare. The full endpoint set is preflighted before any ring starts, so refusal cannot leave it partly opened. All 25 exact-head compiled host cases passed, including the tests that catch reordered preparation and partial endpoint opening. s2idle keeps the existing path.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:display Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants