Skip to content

drm/apple: keep the refresh rate iBoot left the T6050 panel at - #3427

Merged
RyanTheTide merged 2 commits into
mainfrom
fix/dcp-t6050-keep-boot-rate
Nov 28, 2026
Merged

RyanTheTide merged 2 commits into
mainfrom
fix/dcp-t6050-keep-boot-rate

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

What

After macOS (here an HV guest) left the K114s (T6050) internal panel at 60 Hz, every Linux boot crashed the internal DCP about two seconds in and left the panel dark: no backlight device, eDP disconnected. The state survives warm and VDM reboots.

iBoot hands the panel over at 60 Hz (the firmware logs update_rr_index syncrate 60). The driver offers only the 120 Hz timing on this DCP (only_120hz_modes), so its first mode set asks for timing 2. The firmware then really switches modes (hard_power_state 0, shutdown_link, mode_set_gated 3024x1986@120), hits a DPTX FIFO error and crashes. On a healthy boot it is handed over at 120 Hz and answers Already set to timingID: 2. A 120 → 60 Hz mode set already crashed the M5 Max, which is why the guard exists.

The firmware names the rate it found at start before any mode set of ours. Keep the first such rate and offer only modes at it on these panels, or 120 Hz when none was reported (unchanged). The mode set then finds the timing already set and the panel lights. This follows the existing link report, which already reads the firmware's mode-set log line.

Tested

Tested: K114s (T6050) at cdb7a3f (driver files as f4c4b03): panel handed over at 60 Hz lights (Already set to timingID: 3), 0 DCP crashes, 0 failed units; J616s inert; KUnit 372/373 + apple-dcp host tests 96/96.

  • KUnit (edr.kunitconfig, arm64 QEMU): 373 tests, 372 passed, 1 skipped. parser_internal_v27_only_120hz gains the reported-60-Hz case.
  • K114s with the panel handed over at 60 Hz, lab kernel restricting the panel to 60 Hz modes by a knob (equivalent to this change): Already set to timingID: 3, no DCP crash, backlight present, eDP connected, GNOME greeter up. Logs: our trace traces/display/20261128-k114s-dcp-handoff-crash. A row at this head follows.

Risk: one-way · T6050 internal DCP (K114s/M5 Max) when iBoot hands the panel over at a rate other than 120 Hz: the panel lights at that rate instead of the DCP crashing; 120 Hz handovers unchanged

Not yet

  • A 120 Hz handover row at this head after the K114s cold boot (behaviour there equals today's: the latched rate is 120).
  • An M5 Max row (only_120hz_modes came from there).

Rows: K114s 60 Hz handover (batched with #3423) and J616s (inert there) are posted below.

After macOS left a K114s (T6050) panel at 60 Hz, every Linux boot crashed
the internal DCP about two seconds in and left the panel dark: iBoot hands
the panel over at 60 Hz, the driver offers only the 120 Hz timing
(only_120hz_modes), and the mode set from 60 to 120 Hz takes the link down
and crashes the firmware, as 120 to 60 Hz already did on the M5 Max.  The
state survives warm reboots.

The firmware names the rate it found at start, "IOMFB update_rr_index
syncrate 60", before any mode set of ours.  Keep the first such rate and
offer only modes at it on these panels, 120 Hz when none was reported.
The mode set then finds the timing already set ("Already set to timingID:
3") and the panel lights.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

K114s row (M5 Pro, T6050, firmware 27), batched boot. Kernel 7.3.0-k114srow = main aa3351bc + #3427 (f4c4b038) + #3423 (7a8f8c9a), the K114s's own config, no extra kernel arguments, one-shot boot (default untouched). The panel was still being handed over at 60 Hz (state left by a macOS session), the case in which every boot of the current main crashes the internal DCP.

  • drm/apple: keep the refresh rate iBoot left the T6050 panel at #3427: the firmware logs update_rr_index syncrate 60 and the driver asks timing 3 → Already set to timingID: 3 colorID: 1. No DCP crash, apple-panel-bl present (set 200 → actual 200), eDP connected, GNOME greeter up, SELinux enforcing, 0 AVC denials. On main, the same handover gives hard_power_state 0 → shutdown_link → mode_set_gated ...@120 → DCP has crashed.
  • drm/apple: don't offer PQ on firmware 27 panels #3423: the eDP connector's properties are EDID, DPMS, TILE and vrr_capable only: no Colorspace, HDR_OUTPUT_METADATA or PQ_REFERENCE_LUMINANCE, so GNOME offers no HDR. EDID is 128 bytes with no extension block (no HDR static metadata), and the P3 primaries are still present. output_pq/output_edr 0.

Still to run: a 120 Hz handover on this head (after a cold boot) and the J616s row for #3423 (desktop 26.x, HDR must stay offered).

@RyanTheTide
RyanTheTide marked this pull request as ready for review November 27, 2026 19:44
@RyanTheTide
RyanTheTide requested review from a team as code owners November 27, 2026 19:44
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

J616s (desktop 26.x): booted the same batched kernel (7.3.0-j6row = main + this + #3423), panel and modes unchanged, 0 DCP crashes: only_120hz_modes is T6050-only, so this change is inert there. Full table on #3423: #3423 (comment)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Non-author merge-train review at f4c4b038: MERGE once CI is green. On hw.only_120hz_modes DCPs (T6050 internal), the driver keeps the refresh rate the firmware reports at start (IOMFB update_rr_index syncrate N, before our first mode set, bounded to 24–240) and offers only that timing. There's no mode set away from iBoot's rate, which crashes the DCP in both directions. With no report, it falls back to the old 120 Hz rule. KUnit covers the 60 Hz case. Rows: K114s (the dark panel is fixed) and J616s (inert). Nit, not blocking: it keys on a syslog string. If a firmware rewords it, we drop back to the 120 Hz behaviour (the 60 Hz-handover crash returns, nothing worse), so a later move to a structured property would be sturdier.

@DjDeveloperr code-owner ping (interim rule, point 6): this fixes Ryan's dark K114s panel. I'll merge after 07:49 AEDT if CI is green, the App approves, and you have no objection. Revert: git revert -m 1 <merge>.

…unit

dcp_rtk_syslog_is_debug() now hands each record to
dcp_rtk_syslog_boot_rate().  Extract it with a minimal apple_dcp as the
RTKit cookie, and check that the first 'update_rr_index syncrate' rate is
kept, later and out-of-range rates and other panels are ignored, and the
record keeps its info level.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

host-tests: syslog-policy extracts dcp_rtk_syslog_is_debug(), which now calls dcp_rtk_syslog_boot_rate(). Pushed cdb7a3f4: the unit gets a minimal apple_dcp as the RTKit cookie and checks that the first 'update_rr_index syncrate' rate is latched, later or out-of-range rates and other panels are ignored, and the record stays at info. Local apple-dcp suite: 96/96 ok. Test-only commit: the K114s row's driver files are unchanged.

@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 cdb7a3f4fff2, once the KUnit jobs still queued finish green (build, kunit and host-tests already are).

Blockers: none.

Checked: read the whole diff; checked in three K114s boot logs (good, bad, row) that the latched line arrives before anything the driver does with modes; checked that cdb7a3f4 is test-only over the rowed f4c4b038; looked for a way the latch could pick the wrong rate or touch other DCPs; checked that it works on the default command line; no attribution.

Evidence
  • Ordering is structural, not timing: in traces/display/20261128-k114s-dcp-handoff-crash/private/ (good 01:18, bad 04:12, row 05:4x), update_rr_index syncrate N is logged during the DCP firmware's own start, before the driver logs "DCP booted", before the first dcp_hotplug(), and before [drm] Initialized apple. So dcp_mode_valid()/dcp_mode_settable() can't run before boot_rate is set. In the row it is 1.218 s, against 1.342 s for the first set_digital_out_mode(timing:3), then Already set to timingID: 3.
  • Scope: dcp_rtk_syslog_boot_rate() returns at once unless hw.only_120hz_modes (T6050 internal DCP only). The value is latched once, bounded to 24–240, and the record keeps its log level. External DCPs and every other SoC are untouched (J616s row: inert).
  • Fallback: no line, or a reworded line, gives boot_rate 0, so 120 Hz only, exactly today's rule.
  • Default command line: the row kernel had no extra arguments; the RTKit syslog callback runs for every record regardless.
  • Test-only head: git diff f4c4b038 cdb7a3f4 touches only tools/testing/selftests/drivers/gpu/apple-dcp/boot.py, so the K114s row (driver at f4c4b038) applies.
  • Merges clean with main aa3351bc+.

Not blocking, already under Not yet: (1) no M5 Max log of this line exists on the store. If a Max's firmware ever reports a non-120 rate first, that Max now runs at that rate instead of trying 120; a fixed rate, not a crash. A Max row should confirm it reports 120. (2) A K114s handed over at 60 Hz stays at 60 Hz for that boot (ProMotion returns after a 120 Hz handover). That is the right trade against a dark panel, but worth a line in the release notes. (3) As MERGETRAIN6 noted, a structured firmware property would be sturdier than the syslog string.

@github-actions github-actions Bot added area:display Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:one-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Merge readiness at cdb7a3f4: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at cdb7a3f4
Conflicts ok none
PR text ok Risk: one-way · T6050 internal DCP (K114s/M5 Max) when iBoot hands the panel over at a rate other than 120 Hz: the panel lights at that rate instead of the DCP crashing; 120 Hz handovers unchanged Not yet - A 120 Hz handover row at this head after the K114s cold boot (behaviour there equals today's: the latched rate is 120). - An M5 Max row (only_120hz_modes came from there). Rows: K114s 60 Hz handover (batched with #3423) and J616s (inert there) are posted below.

Areas: area:display

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

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merging under the 6-point rule (Ryan 09:29, permanent), at cdb7a3f4.

  1. The review App approved at this head. cdb7a3f4 only adds selftest coverage over the reviewed f4c4b038.
  2. Full CI is green.
  3. K114s row: the internal panel lights. Before this, the DCP crashed after the 60 Hz handover.
  4. J616s row: inert.
  5. There's no blocking review.
  6. Dj was pinged here at 06:44 AEDT with no objection.

Revert: git revert -m 1 <merge>.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Follow-up row (merged change), K114s on Ryan's default bridge v4 (7.3.0-k114sstack, includes this change), 11-28 15:40: the panel is handed over at 120 Hz again (update_rr_index syncrate 120), so the driver offers the 120 Hz timing as before this change, and the panel lights with 0 DCP crashes (K114S-STACK default checklist). Together with the 60 Hz handovers earlier today (lit, 0 crashes, across several recovery reboots), both handover cases are covered.

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) blast:m5 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:one-way Revertible or not, from Merge risk (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.

1 participant