Skip to content

drm/apple: stamp the J514C panel's swaps - #2805

Draft
RyanTheTide wants to merge 3 commits into
mainfrom
dcp/m3-pro-promotion-stamps-v2
Draft

RyanTheTide wants to merge 3 commits into
mainfrom
dcp/m3-pro-promotion-stamps-v2

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Replaces #1632. Reduced on 12-05 after #1969 landed.

Problem

On firmware 14.7 a ProMotion panel whose swaps carry zero timestamps presents at 60 fps even when set to 120 Hz: the firmware completes at most one swap per 16.7 ms. 47d53ce fixed that for the J516C record, and #1969 (merged) for the T6030 record (J514S, J516S). The J514C record (MacBook Pro 14", M3 Max) runs the same J516C DCP image on a 120 Hz panel and still has no swap_timestamps.

Change

Set swap_timestamps on the J514C record, as main does for the J516C and T6030 records, and update the v14_board_swap_timestamps KUnit case. Main's per-record flag is kept (this PR originally derived stamping from promotion; main has since chosen the per-record flag and keeps the J504 record unstamped on purpose, so that design stays). The 60 Hz T8122 panels, the J504 record and external processors are unchanged.

Testing

  • arm64 LLVM W=1 iomfb_v14_7.o and v14-board-test.o build with no warnings on main 7b10eb1.

Still to run

A J514C row on the default command line: at 120 Hz, apple-dcp swap completions about 8.33 ms apart and Wayland frame callbacks at about 120 fps; at 60 Hz, about 16.67 ms; 0 new kernel errors. No J514C in our lab.

On a J514S (MacBook Pro 14", M3 Pro) the internal panel is set to its
3024x1890@120 timing, but swaps complete 16.64 ms apart and Wayland
frame callbacks run at about 60 fps. The T6030 board record, which
serves the J514S and J516S, has promotion but not swap_timestamps, so
its swaps go out with zero timestamps. With zero timestamps the 14.7
firmware completes at most one swap per 16.7 ms, the behaviour
47d53ce ("drm/apple: stamp the J516C panel's 14.7 swaps") fixed on
the J516C. The J514C record has the same gap: it runs the J516C's own
DCP image, where stamping was measured, on a 120 Hz panel.

Set swap_timestamps in the T6030 and J514C records. Every 14.x board
record with a 120 Hz panel now stamps its internal swaps with the
constant deadline, as the template path (fa13cbd) and the M4 path
(09986ee) do for their 120 Hz panels. The 60 Hz J613/J615 panels
and the external processors keep zero timestamps, byte for byte.

The board KUnit case now checks the J514S, J516S, J514C, J516C, J613
and J615 records, and that swap_timestamps follows promotion on each.

Not tested on M3 hardware: no J514S, J516S or J514C was available. The
J516C result and the reporter's measurements are the evidence; the
reporter's test of this change on a J514S is the check.

Reported-by: fraudsta (Discord: thetennisfan)
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
swap_timestamps was set on exactly the records that have promotion, and
the KUnit case asserted that the two are equal. A separate flag only
leaves room for the next 120 Hz record to miss it, which is how the
T6030 and J514C records lost their stamps. Decide it in
dcp_v14_board_stamps_swaps() from board->promotion and drop the field.

No record changes behaviour: the three records that stamped still do,
and the 60 Hz T8122 records still don't. The KUnit case now checks the
ProMotion bits and that the stamp decision follows them.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>

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

Reviewed at 2506e1647580b8f0548cb3e76a0112fb034274d5 against pre-pr-checklist.md (§1–§6).

0 code blockers. The code and tests are clean:

  • §1 / §2 / §3: Dropping the redundant per-board swap_timestamps boolean and deriving swap stamping from board->promotion in dcp_v14_board_stamps_swaps() (drivers/gpu/drm/apple/iomfb_v14_7.c:1710-1713) removes the per-board drift that left T6030 (J514S/J516S) and J514C unstamped at 60 fps. External processors and 60 Hz T8122 panels (J613/J615) keep zero timestamps byte-for-byte, and ProMotion panels stamp constant DCP_V14_SWAP_TIMESTAMP_VALUE (120) in slots 0, 1, and 6 matching J516C (47d53ce42303).
  • Tests & CI: KUnit v14_board_swap_timestamps covers J514S, J516S, J514C, J516C, J613, J615, external role, and NULL board; host-tests CI passes at 2506e1647580.
  • §4 & §6: Both commits (1882f3be6ee2, 2506e1647580) carry human author/committer and Signed-off-by: only (zero AI commit trailers); naming clean.

Blocker before approval (§5 hardware evidence)

  • This is a non-draft PR with no hardware run yet on any newly enabled M3 Pro/Max panel (J514S, J516S, or J514C). Before merge (or convert back to draft until a tester row lands), please attach a J514S or J516S hardware row at 2506e1647580 on the default command line confirming:
    • 120 Hz mode (3024x1890@120 on J514S / 3456x2234@120 on J516S): dcp:iomfb_swap_complete intervals ~8.33 ms and wl_surface.frame ~120 fps;
    • 60 Hz mode: ~16.67 ms unchanged;
    • System regression counts: 0 SELinux denials, 0 failed units, 0 new kernel errors.

Non-blocking notes

  • The PR description still cites the superseded #1632 commit SHA 983f5f98 in two places ("second commit, 983f5f9" and "At 983f5f9"); please update those to 2506e1647580.
  • Note overlap with open PR aurora-silicon/linux#1969 (drm/apple: t6030: swap timing words and early flip for 120 Hz) when coordinating merge order.

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide
RyanTheTide marked this pull request as draft November 22, 2026 13:18
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Looking for a row from anyone with a J514S or J516S (M3 Pro), or a J514C (M3 Max 14"). There's none in our lab.

Test kernel at this head (2506e16), Fedora Aurora 44 and 45 RPMs: https://github.com/aurora-silicon/linux/releases/tag/untagged-8afc8a87f355fb09576d (install notes and SHA256SUMS on the page).

What to check, default command line:

  1. At 120 Hz: apple-dcp swap completions about 8.33 ms apart, and Wayland frame callbacks at about 120 fps (WAYLAND_DEBUG=1 on a client, or any frame-pacing tool you already use).
  2. Switch the panel to 60 Hz: swap completions about 16.67 ms apart.
  3. New kernel errors (journalctl -k -b -p err), SELinux denials and failed units, compared with your current kernel.

The M1 Pro/M2 and M4 Pro paths don't use these board records, so they can't stand in for this row.

Assisted-by: LLM (Claude:Opus 5.5)

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide RyanTheTide changed the title drm/apple: stamp the swaps of every 14.7 ProMotion panel drm/apple: stamp the J514C panel's swaps Dec 5, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Forward-merged main 7b10eb1 as e12d01c. #1969 has meanwhile set swap_timestamps on the T6030 record (J514S/J516S), which was this PR's main case, and main keeps the per-record flag (its J504 record is deliberately unstamped). So the merge takes main's design and this PR now only sets the flag on the J514C record, the one 120 Hz record still unstamped, with the KUnit case updated. Title and description updated. @DjDeveloperr, your M3 Pro row request is covered by #1969 on main; what remains is a J514C row, which needs an M3 Max 14" owner.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants