Repository navigation
Conversation
scottjones
left a comment
There was a problem hiding this comment.
Thanks for this, Ilyas. The J514S results are really solid: 120 fps under glmark2, and the idle power numbers make a good case for the variable mode. Following the existing 26.6 path for the 120/60 split was the right call too, it made this easy to review.
Blocking: the board KUnit test fails
Commit 1 sets .swap_timestamps = true for T6030 (iomfb_v14_7.c:107), but v14-board-test.c:260 and :267 still expect it to be false, so the display KUnit suite fails. CI hasn't caught it yet because the Kernel CI run is waiting for approval.
#358 from cachebag makes the same board change and updates those two expectations. Since you offered to drop commit 1 if one of those landed first, I think that's the cleanest route: land #358, then rebase this without commit 1. If you'd rather keep it self-contained, updating the two expectations here works too.
Suggestion: gate the split on boards that stamp swaps
The 120/60 split (iomfb_v14_7.c:2674) is gated on promotion and a 120 Hz best timing. That also covers J504, J516C, J516M, J514C and J514M, which the PR doesn't list. On the boards that don't stamp swaps (J504, J514C, J514M), both modes send identical swaps, so the split doesn't change anything there and just adds a 60 Hz option that behaves the same as 120.
Adding dcp_v14_board_stamps_swaps(v14->board, false) to the condition would keep it to the boards where it actually works. To be upfront: that would also mean J514M picks up the split once my #457 (J514M timestamps) lands.
Optional, low priority
Right now timed follows vrr, so a stamping board only stamps when the best timing is exactly 120 Hz. Defaulting timed to true and clearing it only for the locked 60 Hz mode would protect those boards if the best timing were ever 60 Hz. The J516C/J516M logs we have show a single 120 Hz timing, so this isn't a real regression today, just a bit of robustness.
Happy to approve once the test is sorted.
ee290f4 to
c7f9239
Compare
|
Thanks for the review. I've reworked it:
Re-tested on the J514S. Both modes are offered. glmark2 FIFO gives 121 FPS at 120 Hz and 61 FPS at 60 Hz, and switching back gives 118. There were no DCP errors. For this test I loaded the same logic as a module on my daily kernel; the branch itself is on #358's older base. I couldn't run the display KUnit suite here, so I'm relying on CI for that. |
The T6030 (M3 Pro) record admits the panel's 120 Hz timing, but its swaps go out with zero timestamps, so the firmware completes at most one per 16.7 ms: the mode reports 120 Hz while a vsync-locked client measures 60 fps. The J516C already sends the constant timestamps for this; set swap_timestamps on the T6030 record too. Tested on a J514S (MacBook Pro 14", M3 Pro), DCP firmware 14.7, on aurora-2026.10.17.20 with the equivalent change: es2gears_wayland goes from 60.0 to 119.9 fps on the built-in panel. Not tested on a J516S, which shares the record. Signed-off-by: cachebag <alhakimiakrmj@gmail.com>
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: aurora-silicon/linux#1633 Assisted-by: Claude:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ilyas Akin <ashnwor@gmail.com>
c7f9239 to
c41855a
Compare
|
#358 was closed without being merged, so I've rebased this onto current I've now run the display KUnit suites in QEMU on the rebased branch, which I couldn't do before:
On the J514S, the same two commits run in my daily kernel: 3024×1964 at 120 Hz, with the locked 60 Hz mode also listed. @cachebag, if you'd rather this commit didn't land through this PR, let me know and I'll drop it. |
|
Tested on a second J514S.
Test setup
Testing and write-up assisted by Claude Code. |
|
Follow-up: idle power of the two modes on the same J514S. The machine is on battery, the desktop is idle (CPU 0.1 %), brightness is unchanged, and I sampled the SMC "Total System Power" 4 times per second.
Each run is 60 s (30 s for the re-check), 3 s after So on an idle desktop, the locked 60 Hz mode costs about 0.6 W more than 120 Hz variable. My guess is that with timed swaps the panel drops well below 60 Hz on a static image, while the locked mode keeps it at 60. I haven't checked the panel's actual refresh to confirm that. If so, it may be worth saying in the mode's description, or in the docs, that the locked mode is for constant timing and not for saving power. Testing and write-up assisted by Claude Code. |
|
Thanks for testing on a second J514S, and for the idle numbers. They match mine: on an idle desktop, the locked mode drew about 0.45–0.6 W more than variable refresh here too (the commit message has 7.88 vs 8.45 W). Your guess is the reason: with timed swaps the panel lowers its refresh on a static image, and the locked mode, whose swaps carry no timing words, holds it at 60. I looked at making the locked mode lower its rate too. There are two ways, and I've left both out of this PR:
I'll add a line to the commit message saying the locked mode is for constant timing, not for saving power. |
What this changes and why
On the J514S (MacBook Pro 14", M3 Pro, T6030), the internal ProMotion panel has two problems:
timing 1/1), so GNOME, KDE and Hyprland offer only 120 Hz.Stacked on #358 (cachebag), which stamps the T6030 panel's swaps and updates the board test, giving 120 FPS. This PR adds one commit on top:
iomfb_v26_6.c) already does.Part of aurora-silicon/linux#1633.
What was tested
DDF38191-…, which ships in macOS 14.7.5–14.7.8. This is the build the T6030 record pins.linux-aurorarecipe, pointed at the commit withtools/aurora-ci/prepare-recipe.py, then installed and booted.Modes
availableModes3024x1964@120only@120and@60offered--swap-mode fifohyprctldoes not blank the panel.Idle power
The desktop was static with 0.1 swaps/s, read from the DCP debugfs swap counter. Each value is the average of 60 s of SMC
PSTR(total system power), on AC:PHPC)The panel lowers its refresh rate itself when no swaps arrive in the variable-refresh mode. For comparison, macOS on another J514S reports
IOMFBDisplayRefreshfordisp0as 120 Hz minimum interval and 24 Hz maximum interval (displayMin/MaxRefreshIntervalMachTime200000/1000000).A busy desktop sends frames all the time and gives no saving. An earlier run where my terminal redrew about 23 times a second showed 9.86 W vs 9.71 W.
Build:
make W=1 drivers/gpu/drm/apple/iomfb_v14_7.o(clang) is clean. checkpatch is clean apart from the trailers.Findings for #1633
These came up along the way, and are useful to anyone continuing on VRR for this panel:
hw.tbfrequency). The CPU counter on T6030 runs at 1 GHz. Real swap timestamps work once the counter is scaled to 24 MHz; I tested this with an experimental parameter. Unscaled 1 GHz values are about 42× in the future, which explains the existing comment that "counter values make the firmware time out".set_parameter_dcphere too, and it needs a u32 reply. The handler writes its status through the reply pointer. Calling it without a reply crashes the DCP: at 0x140c2c in theDDF38191image,str w8, [x19]with x19 = 0. With a 4-byte reply,IOMFBParameter_adaptive_sync(parameter 14) is accepted with status 0 for minRR 24 Hz and 120 Hz. In my measurements the minRR value made no measurable difference to idle power once the swaps are timed, so this PR doesn't use it.What was NOT tested
promotionand a 120 Hz best timing; J613 and J615 (60 Hz) are unaffected.Risk
AI assistance
🤖 Generated with Claude Code