Skip to content

drm/apple: Default to native refresh on panels and native resolution at full refresh on external displays - #562

Merged
RyanTheTide merged 3 commits into
integration/aurorafrom
j616s/panel-native-refresh
Oct 29, 2026
Merged

RyanTheTide merged 3 commits into
integration/aurorafrom
j616s/panel-native-refresh

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

On the J616s, GNOME brings the internal panel up at 60 Hz with a fixed refresh whenever it creates a new monitor configuration, for example after a display is plugged in. Mutter's default configuration uses the fixed-rate variant of the mode the kernel marks preferred; the VRR default is aurora-silicon/fedora-aurora#41.

Cause. The panel's firmware ranks its 120 Hz timing first (IsPreferred, score 17026 vs 15523 for 60 Hz), and the parser marks it preferred. The desktop 26.6 takeover trial (from the T6041 panel bring-up, c7a3e09) then tries the boot-like mode first, which is 60 Hz because the boot loader runs the panel at 60 Hz. It moves the preferred mark to whichever mode it accepts, so 60 Hz was always preferred.

Fix. Try the preferred mode first, and the boot-like mode only if it fails. The trial's guarantee is unchanged: the mode proven at takeover is still the one marked preferred, and the console and a desktop pick it. That mode is now the panel's native 120 Hz. Nothing changes for other machines, since the trial only runs for a desktop 26.x panel.

Second commit: external displays default to native resolution at full refresh. The firmware marks the EDID's first timing IsPreferred, so displays came up there: an Acer QG270 S3 at 1920x1080@60 of a 180 Hz panel, and an MSI MPG 325CQRXF at 1920x1080@240 of a 2560x1440 panel. The default is now the native resolution (the largest IsPreferred one, or the largest of all) at its highest refresh rate. Ties go to IsPreferred, then the firmware score, and a timing whose SDR elements are all unsafe or DSC-only is never the default. Panels keep their firmware's preference. This is a shared rule for all external processors on every machine.

Third commit: firmware-derived EDID timing. With the new external default, the preferred mode is often not an IsPreferred timing, and the firmware-derived EDID builder (#530) then built no EDID (names lost). The EDID's detailed timing now uses the preferred mode when it qualifies, otherwise the highest-scored IsPreferred timing, the one the sink's own EDID lists first.

Hardware (J616s, fleet6 + this PR + #561):

  • Takeover trial accepts 3456x2234@120, and KMS marks it preferred.
  • MSI on USB-C defaults to 2560x1440@280; the Acer on direct HDMI defaults to 1080p120. On that link the firmware marks every SDR element unsafe at 144 and 180 Hz, so 120 Hz is the highest usable rate; users can still pick 180.
  • All three displays named.
  • A fresh GNOME layout (monitors.xml moved aside) comes up at exactly those modes.

Not in this PR. VRR on by default: mutter 51 has no default-VRR setting. A new configuration always takes the fixed variant, and in variable mode mutter only sets VRR_ENABLED while a fullscreen surface is the scanout candidate. That needs a decision on the userspace side.

Tests. apple-dcp host selftests 80/80, with synthetic catalogs modelled on the Acer, the MSI (including an unsafe-only 300 Hz timing that must not win) and a panel. A deliberately wrong expectation fails, so the checks are live. drm/apple KUnit (qemu arm64): 178 passed, 1 skipped (needs CONFIG_UCLAMP_TASK).

🤖 Generated with Claude Code

GNOME brings the J616s panel up at 60 Hz with a fixed refresh whenever
it makes a new monitor configuration: it takes the mode the kernel
marks preferred. The panel's firmware ranks its 120 Hz timing first
(IsPreferred, highest score), and the parser marks that one, but the
takeover trial set the boot-like 60 Hz mode first and then moved the
preferred mark to whichever mode it accepted, so 60 Hz it always was.

Try the preferred mode first and the boot-like one only if it fails.
The mode that worked stays the preferred one, as before, and is now
the panel's native 120 Hz.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…resh

An external display came up in the timing its EDID lists first: the
firmware marks that timing IsPreferred, and the parser preferred
IsPreferred timings, then the highest score. On an Acer QG270 S3 that
is 1920x1080 at 60 Hz of a 180 Hz panel; an MSI MPG 325CQRXF marks
1920x1080 at 240 Hz and 2560x1440 at 60 Hz, and the score picks
1920x1080 for a 2560x1440 panel.

Default an external display to its native resolution at the highest
refresh rate it can take, as other systems do: the native resolution
is the largest the firmware marks IsPreferred (the largest of all when
it marks none), and among its timings the higher refresh rate ranks
first, then IsPreferred, then the firmware score. A timing whose SDR
color elements are all unsafe or DSC only is never the default. Panels
keep the timing their firmware prefers.

The host selftests cover the three cases with synthetic catalogs
modelled on both displays and a panel.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide RyanTheTide changed the title drm/apple: Keep the desktop panel's native refresh preferred drm/apple: Default to native refresh on panels and native resolution at full refresh on external displays Oct 29, 2026
The detailed timing of a firmware-derived EDID was the preferred mode,
accepted only when the firmware marks that timing IsPreferred and
describes it fully. Now that an external display defaults to its
native resolution at its highest refresh rate, the preferred mode is
often a timing the firmware does not mark, and the EDID was not built
at all: an MSI MPG 325CQRXF defaulting to 2560x1440 at 280 Hz came up
with no EDID.

Take the preferred mode when it qualifies, otherwise the highest-scored
timing the firmware marks IsPreferred, the one the sink's own EDID
lists first. The EDID describes the sink; the mode set is unaffected.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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.

1 participant