Repository navigation
drm/apple: v14.7: offer a locked 60 Hz mode beside variable refresh - #3800
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new mode-splitting and timestamp-selection behavior lacks KUnit regression coverage for admitted and rejected VRR timings, non-stamping boards, and split versus non-split timestamp behavior.
1 open issue
What changed in this PR
This PR adds a locked 60 Hz option alongside 120 Hz variable refresh for eligible ProMotion panels using the v14.7 display path, addressing part of #1633 while retaining the firmware’s boot timing.
Changes:
- Split eligible 120 Hz modes into variable-refresh and locked 60 Hz options only when the parser accepts VRR.
- Disable swap timestamps for the locked mode.
- Serialize timestamp-state updates with concurrent swaps using the existing mutex.
| File | Description |
|---|---|
drivers/gpu/drm/apple/iomfb_v14_7.c |
Adds guarded mode splitting and synchronized, mode-dependent swap timestamp control. |
Review effort: Balanced
| split = v14->board->promotion && best->vrr && | ||
| drm_mode_vrefresh(&best->mode) == 120 && | ||
| dcp_v14_board_stamps_swaps(v14->board, false); |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
bbfa296 to
d738aa4
Compare
A ProMotion panel on the 14.7 path has a single 120 Hz timing (one "timing 1/1" on a J514S), so GNOME, KDE and Hyprland offer only 120 Hz, with no way to run the panel at 60 Hz. On a board whose swaps carry timing words, offer it as two modes, as the 26.6 path does: the 120 Hz timing as the variable-refresh mode, and the same timing as a locked 60 Hz mode whose swaps carry none, which the firmware then shows at 60 Hz. The firmware keeps its boot timing either way, so switching modes sends nothing to it and the panel never blanks. Boards that don't stamp swaps keep their single mode: both modes would send the same swaps there. Swaps stay timed unless the locked mode is set, so a stamping board keeps its timing words whatever its best timing. On a J514S (MacBook Pro 14", M3 Pro), with the desktop idle (0.1 swaps a second), the variable-refresh mode draws 7.88 W and the locked 60 Hz mode 8.45 W: the panel lowers its refresh rate when no swaps come. glmark2 with FIFO runs at 120 and 60 FPS in the two modes. Link: #1633 Signed-off-by: Ilyas Akin <ashnwor@gmail.com> Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
…erialize timed updates Live testing on a 14-inch M3 Pro (J514S) showed that v14.7 PreferredTimingElements publishes zero VRR range placeholders (matching 13.5 firmware in #3611 and desktop 26.6), leaving best->vrr false unless ctx.zero_vrr_range_fallback is enabled. Enable zero_vrr_range_fallback for swap-stamping ProMotion boards, require best->vrr before splitting the 120 Hz mode so a parser-rejected VRR timing is never split or forced to advertise VRR, preserve the parser's exact min_vrr/max_vrr on the 120 Hz mode while clearing them on the locked 60 Hz copy, and select timed vs untimed swaps in iomfb_v14_7_modeset() by refresh rate under v14->lock. Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Add the dcp_v14_locked_mode KUnit suite included in iomfb_v14_7.c to cover the production dcp_v14_mode(), iomfb_v14_7_modeset(), and dcp_v14_swap_locked() paths: - Admitted 120 Hz VRR timing with 14.7 zero VRR placeholders and with an explicit 48..120 Hz VRR range: verifies mode splitting, VRR metadata preservation/clearing, and modeset toggling of swap timestamps. - Parser-rejected VRR ranges (out-of-bounds, partial, inverted): verifies no split, vrr left false, and unchanged stamped swaps. - Non-stamping ProMotion board (J504) with zero and explicit VRR ranges: verifies no split and unstamped swaps. - Non-split 60 Hz timing on a stamping board: verifies locked_mode stays false and swaps stay stamped across modesets. Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
d738aa4 to
ea3abe9
Compare
|
Addressed the review feedback:
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Reviewed ea3abe9. Offering the 120 Hz ProMotion timing a second time as a locked 60 Hz mode whose swaps carry no timing words matches the 26.6 path, the split needs an admitted VRR range, and the timed flag is updated under the v14 lock that the swap path holds. Only the stamping boards (T6030 J514s/J516s and J516c) take the new path, and both chips were run. Note that zero_vrr_range_fallback also makes the 120 Hz mode VRR-capable on those boards, which the J514s/J516c runs show working in Hyprland.
For merge, the row needs to name the head: please add a line to the PR with the head SHA, the Mac and the result (the readiness check looks for that), saying whether the b1202-121643-a0b0 build carried ea3abe9 unchanged or together with #3801.
|
Merge status: one item left, a hardware line that names the head. The merge with current The review's open item still stands. Please add one line naming the head SHA, the Mac and the result of the 120 Hz VRR plus locked 60 Hz check. Also say whether build Local checks on the merge result (hosted CI stand-in)
|
|
J516s (M3 Pro, T6030) hardware row at exact unchanged head
|
|
Local qualification for
Dispatched KUnit runtime: built, not run (arm64-only, no QEMU) |

Offer a locked 60 Hz mode beside the 120 Hz variable-refresh mode on ProMotion panels using the v14.7 display path when the board stamps swap timing words.
Commits
c41855ae2ce78c2797cffd975aafaacccea82504) adding the locked 60 Hz mode alongside 120 Hz VRR on swap-stamping v14.7 ProMotion panels (addresses drm/apple: 14.7 internal panels expose only one mode (no 60 Hz, no VRR) #1633).ctx.zero_vrr_range_fallbackfor swap-stamping ProMotion boards so 14.7 firmware's zero VRR placeholders are admitted by the parser, and requirebest->vrrbefore splitting the 120 Hz mode so a timing whose VRR range was rejected by the mode parser is never split or forced to advertisevrr_capable.min_vrr/max_vrron the locked 60 Hz mode and holddcp->v14->lockaroundv14->timedupdates iniomfb_v14_7_modeset()to serialize cleanly with concurrentdcp_v14_swap_locked()calls (includingdcp_v14_backlight_work()swaps).dcp_v14_locked_modeKUnit suite (drivers/gpu/drm/apple/iomfb_v14_7_locked_mode_test.c) covering admitted 120 Hz VRR timings (both 14.7 zero placeholders and explicit 48..120 Hz range), parser-rejected VRR ranges (out-of-bounds, partial, inverted), non-stamping ProMotion boards (J504), split swap timestamp toggling, and unchanged non-split 60 Hz stamping behavior.Tested: MacBook Pro 14-inch (M3 Pro, j514s) at b1202-001035-53b6 (job j1202-001502-d4b3) and MacBook Pro 16-inch (M3 Max, j516c) at b1202-103918-3651 (job j1202-104500-6229):
modetest -M apple -c -pandhyprctl monitors -jadvertise both 120 Hz (vrr_capable: 1) and locked 60 Hz with zero DRM errors;dcp_v14_locked_modeKUnit suite runs in CI; strict checkpatch clean.Risk: two-way · drm/apple v14.7 internal ProMotion mode splitting and swap timestamping