Repository navigation
drm/apple: take a panel's zero refresh range as no range on firmware 27 too - #3369
RyanTheTide wants to merge 5 commits into
Conversation
…27 too The K114s's internal ProMotion panel (firmware 27.2) offers no adaptive sync: vrr_capable stays 0 and GNOME has no variable refresh, while the J616s (desktop 26.x) offers it on every panel mode. Both firmwares list the panel's variable refresh range as zero placeholders (the K114s's 120 Hz timing: MinimumVariableRefreshRate and MaximumVariableRefreshRate both 0), and the driver already reads an internal 120 Hz timing without a range as variable down to 24 Hz. The zeros counted as "no range" only for desktop 26.x, so on firmware 27 they left the timing fixed. Take zeros as no range for every firmware. Only an internal ProMotion timing then gets a range (dcp_refresh_range()); external timings and 60 Hz panels stay fixed. Signed-off-by: Ryan Murray <[email protected]>
parser_vrr_empty_range expected the panel's zero placeholders to give a range on desktop 26.x only. With the previous commit they give one on every firmware: an internal ProMotion timing gets 24-120 Hz either way. Signed-off-by: Ryan Murray <[email protected]>
|
J616s regression row (M4 Pro, desktop 26.x firmware, known-gamut mini-LED panel). Test kernel 7.3.0-j6disp = main + linux#3367 (
Files: traces/display/20261127-k114s-dcp/j616s-fleet89-before.txt and j616s-j6disp-after.txt (lab store). |
|
On older-firmware ProMotion panels: our only firmware-13.x ProMotion laptop, the M1 Pro J316s, is headless (eDP-1 disconnected on fleet89), so we can't row that path here. The change only matters where a panel's 120 Hz timing carries zero MinimumVariableRefreshRate and MaximumVariableRefreshRate. Rows so far: K114s (firmware 27, gains VRR 24-120) and J616s (desktop 26.x, unchanged). @DjDeveloperr: could your J714s, or an M1/M2 Pro/Max MacBook Pro, give one row ( |
… firmware 27 Firmware 13.x ProMotion panels can't be checked here (the only one in the lab is headless), so leave them as they were: zeros stay a range there. Desktop 26.x and firmware 27, where both zero placeholders were seen (J616s, K114s), take them as no range. Signed-off-by: Ryan Murray <[email protected]>
|
Narrowed ( |
There was a problem hiding this comment.
Review at 4a71e467 (K114S-STACK, adversarial; not an approval yet).
Checked:
- The logic is right for the two firmwares it names.
zero_vrr_range_fallbacknow also holds on firmware 27, so the K114s's 120 Hz timing (Min/MaxVariableRefreshRate both 0) reachesdcp_refresh_range()and gets 24-120. - External timings stay fixed, because the fallback only applies to internal ProMotion timings.
- The KUnit loop now covers 13.5, 26.6 desktop and 27.0.
Blocking question (project rule: no chip/board/firmware-version gates):
- This widens a firmware-version gate (
fw_compat == 26_6_DESKTOP || == 27_0) instead of removing it. Firmware 13.x keeps "zeros = a 0..0 range" only because it can't be checked here. - What does a 0..0 range do on 13.x today? If it already means "no VRR" (vrr_capable 0), then treating zeros as "no range" on every firmware is the same rule everywhere. The only change on 13.x would be that an internal 120 Hz timing gets the default 24-120 range, which is exactly what this PR asserts is right for ProMotion panels.
- So either drop the version test (one rule for all firmware, with that 13.x consequence stated in the commit), or say concretely why 13.x zeros mean something different. A J314/J316 row or a 13.x timing dump would settle it.
Owed either way: a K114s row at this head (iomfb.c changed since the rowed ff66aef). I'll carry this in the next K114s bridge build so the default-boot checklist provides that row: vrr_capable, debugfs vrr_range, Mutter mode.
There was a problem hiding this comment.
Verdict: FINISH, then merge, at 4a71e467d4af. No blockers in the code; the K114s row at this head needs to cover VRR actually varying.
Before merge:
- K114s row at this head that exercises VRR, not just enables it. The earlier row shows
vrr_capable1, range 24–120,set_digital_out_mode ... vrr:1and Mutter at@120.000+vrr, but not the panel running below 120 Hz. This is the T6050 internal DCP that crashes on a mode set away from the boot timing (#3427), so please show about 10 minutes of a variable-rate workload with VRR on: a full-screen client presenting at, say, 30/48/90 fps (or a 24 fps video in a VRR-aware player), plus the idle desktop, with 0DCP has crashed, the panel lit, and the rate seen to change (debugfs or the swap timestamps). Add one s2idle cycle with VRR on. - Reach: this applies to every firmware-27 internal ProMotion panel, not only the K boards: the J714s/J716c (and J714c/J775c) mini-LED MacBook Pros gain VRR too, including the M5 Max DCP that
only_120hz_modescame from. Nobody here has rowed those. @DjDeveloperr, one J714s row (vrr_capable,vrr_range, a few minutes of variable-rate content, no DCP errors) would settle it. If that can't happen, say so in Not yet.
Checked:
- The change is one condition:
zero_vrr_range_fallbacknow holds for desktop 26.x and firmware 27; firmware 13.x keeps zeros as a range, unchanged. - With the fallback, only an internal 120 Hz ProMotion timing gets a range (
dcp_refresh_range()), so external timings stay fixed (the Acer on DP-2 staysvrr_capable0 in the row) and the 60 Hz M5 Air panel is unaffected. - Interaction with #3427, now in main: after a 60 Hz handover only the 60 Hz timing is offered, and it gets no range, so a VRR mode never asks the T6050 DCP for a mode it didn't boot with.
- KUnit
parser_vrr_empty_rangecovers 13.5 (no range), 26.6 desktop and 27 (24–120). J616s regression row: modes, EDID, VRR range and colour unchanged. - No attribution.
…26.x and firmware 27" Review (no firmware-version gates): take zero refresh-range placeholders as no range on every firmware. On a firmware 13.x ProMotion panel that sends zeros, the internal 120 Hz timing then gets the 24-120 Hz range, as macOS gives it; timings with a real range are unchanged. This reverts commit 4a71e46. Signed-off-by: Ryan Murray <[email protected]>
|
Per review (no firmware-version gates): reverted the narrowing ( |
There was a problem hiding this comment.
Verdict: FINISH, then merge, at 8305dff9852d (same as my review at 4a71e467, plus one point from the revert).
Reverting the narrowing removes the firmware gate, which fits the no-gates rule, and the new code is the one condition from 466cdb00. It also widens the reach: any internal 120 Hz ProMotion timing with zero placeholders now gets 24–120 Hz on every firmware, including the firmware-13.x M1/M2 Pro/Max MacBook Pros, which nobody here can row (the J316s is headless). That's fine if those firmwares either send real ranges (then nothing changes) or behave like the J616s and K114s.
Before merge, in addition to my earlier review:
- The K114s row at this head with VRR under a variable-rate load (unchanged ask).
- One row, or a clear statement in Not yet, for a firmware-13.x ProMotion panel:
vrr_rangebefore/after and a few minutes of variable-rate content with no DCP errors. @DjDeveloperr or anyone with an M1/M2 Pro/Max MacBook Pro. The J714s ask from my earlier review stands for firmware 27.
Checked: 8305dff9 reverts 4a71e467 exactly (the diff against main is 466cdb00 + ff66aef1: the condition set for every firmware, and the KUnit expectation of a range on every firmware). No attribution.
|
K114s row at 8305dff (partial). One-shot on Ryan's bridge kernel (7.3.0-k114sstack) with appledrm.ko = bridge + this change only; panel handed over at 120 Hz.
|
|
Update on the s2idle part of the row above: the K114s can't wake from s2idle on an RTC alarm at all (known gap: no PMU alarm IRQ on this board yet, per the K114s window owner). So the missing wake was the test method, not this change. The s2idle part will be redone with a key/lid wake on the bridge build that carries this PR; the VRR and load parts stand. |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
K114s row on the merge result (bridge4, 7.3.0-k114sstack3 = main 68253d5 + #3369 + other open K PRs; Stage 2 1.0.0b17-ge2a8cf96), 2026-11-28 23:28, fresh boot, read-only: eDP-1 |
|
Blocker found, please don't merge yet. On the K114s (bridge4 = main + this PR + other open K PRs), relighting the internal panel with
The firmware-27 modeset sends adaptive sync minRR 24 Hz, then |
|
Correction to my blocker above, after reading the whole crashed session's log. On that 28-minute boot VRR was never active. The only modeset, at boot, sent adaptive sync minRR 0 ("Already set to timingID"), because firmware-27 panels don't re-modeset on a |
|
Closing. Narrowing this so firmware-27 panels keep |
What
The K114s's internal ProMotion panel (firmware 27.2) offers no adaptive sync:
vrr_capablestays 0, and GNOME offers no variable refresh rate. The J616s (desktop 26.x) offers it on every panel mode.Both firmwares list the panel's variable refresh range as zero placeholders. On the K114s's 120 Hz timing,
MinimumVariableRefreshRateandMaximumVariableRefreshRateare both present and 0 (debugfsvrr_range0/0). The driver already reads an internal 120 Hz timing that has no range as variable down to 24 Hz (dcp_refresh_range()), but zeros counted as "no range" only for desktop 26.x, so on firmware 27 the timing stayed fixed.This takes zeros as no range on every firmware (no firmware-version gate). Only an internal ProMotion timing then gets a range; external timings and 60 Hz panels stay fixed. Consequence for firmware 13.x ProMotion panels (J314/J316): if their 120 Hz timing sends zero placeholders, it now gets the 24-120 Hz range as macOS gives it; timings with a real range are unchanged. They can't be rowed here (our only one is headless).
Tested
Tested: K114s (T6050, firmware 27.2) with this change in a test kernel (main + this + linux#3367 + #2798): vrr_capable 1, vrr_range 24-120,
set_digital_out_mode ... vrr:1, and GNOME's Mutter runs the panel at[email protected]+vrr.vrr_capable0,vrr_range0/0,set_digital_out_mode ... vrr:0, Mutter mode[email protected].vrr_capable0: external timings are untouched.CONFIG_DRM_APPLE_KUNIT_TEST=y, arm64) atff66aef1: 373 tests, 372 passed, 1 skipped.parser_vrr_empty_rangeis updated in the second commit: it expected the zero placeholders to give a range on desktop 26.x only.Risk: two-way · internal 120 Hz ProMotion panels on non-desktop firmware: firmware 27 (K114s, J714s, other T6050) and older laptop firmware such as 13.5 (M1 Pro/Max J314/J316), if they send zero placeholders
Not yet
ff66aef1(rowed), butiomfb.cchanged, so a row at the new head is owed (next K114s window). Ryan's default (the bridge) runs without this today:vrr_capable0.