Skip to content

drm/apple: take the zero VRR range fallback on 13.5 firmware too - #3611

Merged
RyanTheTide merged 1 commit into
aurora-silicon:mainfrom
Ante042:dcp-zero-vrr-range-13-5
Dec 1, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:mainfrom
Ante042:dcp-zero-vrr-range-13-5

Conversation

@Ante042

@Ante042 Ante042 commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

What: On the J314s (display firmware 13.5) the internal ProMotion panel publishes both VRR range fields as zero, so on main it comes up without VRR (vrr:0 on the first mode set). This takes the zero-range fallback, today scoped to desktop 26.6, on 13.5 as well; the panel then gets vrr:1 and Hyprland lists it as VRR capable. Mostly a question about scope, see Details.
Tested: J314s M1 Pro at fb3ad06 (candidate c397c4d6f188 on main ea7aa36): boots, the same failed units as plain main, panel mode set with vrr:1; the parser test covers 12.3 without the fallback and 13.5 and desktop 26.6 with it.
Risk: two-way door · Macs on 13.5 display firmware whose panel publishes a zero range (every 13.5 Mac if the zeros mean something else there).
Not yet: 13.5 Macs other than the J314s and an M2 Max. The FBPropertyManager ... WARNING - type mismatch line the panel's DCP logs at boot with this commit is the firmware's own: plain main logs it too once the panel is powered back on, see the comment below.

Details

9976639 scoped the fallback to desktop 26.6 because older panel paths may use a pair of zeros as an explicit fixed-refresh range. This commit widens a firmware-version condition, and a version is the wrong key if a pair of zeros means fixed refresh on some other 13.5 panel. I have one machine, so I'd rather hear how you want it decided than guess. The options I can see:

  1. Take the fallback whenever both fields are zero, on every firmware, if zeros never mean "fixed" in practice.
  2. Key it on something the panel reports (its mode list reaching above 60 Hz, or another property) — I can read out everything the J314s publishes.
  3. Drop this and solve it another way.

Since the first push the host tests failed on this change: the publication fixture in rate.py did not declare DCP_FIRMWARE_V_13_5. It does now; the driver change is the same.

Evidence
  • Plain main: first mode set on 38bc00000 logs vrr:0.
  • c397c4d6f188: the same mode set logs vrr:1.

Thanks!

@Ante042
Ante042 force-pushed the dcp-zero-vrr-range-13-5 branch from f61e041 to dcc6c11 Compare November 29, 2026 21:56
The 13.5 display firmware of the MacBook Pro 14-inch (2021) publishes both
VRR range fields as zero for its internal ProMotion panel, the way the
26.6 desktop firmware does. The panel runs adaptive at up to 120 Hz, so
take the same fallback there. The parser test now covers three firmware
versions: 12.3 without the fallback, 13.5 and desktop 26.6 with it.

Signed-off-by: Andreas Fernandez <andreas.fernandez@hotmail.com>
@Ante042
Ante042 force-pushed the dcp-zero-vrr-range-13-5 branch from dcc6c11 to fb3ad06 Compare November 30, 2026 08:54
@Ante042
Ante042 marked this pull request as ready for review November 30, 2026 08:55
@Ante042
Ante042 requested review from a team as code owners November 30, 2026 08:55
@Ante042
Ante042 requested a review from Acelogic November 30, 2026 08:55
@github-actions github-actions Bot added area:display Area from CODEOWNERS (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 30, 2026
@Ante042
Ante042 requested a review from malik-na November 30, 2026 08:55
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Merge readiness at fb3ad061: not ready yet

Check Detail
CI at head running running: KUnit isp, KUnit jpeg, KUnit prores, KUnit scaler, KUnit macsmc, KUnit clpc
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at fb3ad061
Conflicts ok not computed yet
PR text ok Risk: two-way · Macs on 13.5 display firmware whose panel publishes a zero range (every 13.5 Mac if the zeros mean something else there).

Areas: area:display

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T09:05:30.089124Z fb3ad06 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at fb3ad061

Blockers:

  • Hosted pull_request CI workflows (Apple build and KUnit, Apple DRM KUnit, Host tests, pr-text) are completed/action_required awaiting maintainer workflow approval for this fork PR; only pr-readiness has executed at fb3ad061.
  • The PR notes a new J314s boot-time DCP firmware warning (FBPropertyManager ... WARNING - type mismatch on a boolean property) seen on candidate c397c4d6f188 that has not yet been isolated from this commit. Please confirm with an isolated boot of fb3ad061 on J314s whether that firmware warning is caused by this change or by another patch in the candidate tree.

Checked:

  • drivers/gpu/drm/apple/iomfb.c (dcp_modes_replace()), drivers/gpu/drm/apple/parser-test.c (parser_vrr_empty_range()), tools/testing/selftests/drivers/gpu/apple-dcp/rate.py, and drivers/gpu/drm/apple/parser.c / dcp-refresh.h on main.
  • Verified dcp_refresh_range() in dcp-refresh.h already restricts the 0/0 fallback (24..rate) to internal && dcp_refresh_is_promotion(rate) (internal ~120 Hz ProMotion modes), so 60 Hz internal 13.5 panels and external displays are unaffected.
Evidence
  • Regarding the scope question in Details: in drivers/gpu/drm/apple/parser.c (dcp_refresh_range()), the zero-range fallback only activates when !minimum && !maximum && internal && dcp_refresh_is_promotion(rate) (120 Hz / 119.88 Hz), so keying on DCP_FIRMWARE_V_13_5 will not enable VRR on 60 Hz 13.5 panels.
  • Workflow runs at fb3ad061469f73132d739a8e3603fcef49708d29: pr-readiness (pull_request_target) succeeded; Apple build and KUnit, Apple DRM KUnit, Host tests, and pr-text (pull_request) are completed/action_required.

@Ante042

Ante042 commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Isolated the firmware line on the J314s, all on main e6c7b03 built the same way. Main plus only fb3ad06 logs FBPropertyManager.h:189 ... WARNING - type mismatch once at boot and once more after a panel power-off/on (2 of 2). Plain main logs nothing at boot, but the same line shows up after a panel power-off/on too (2 of 2), with vrr:0 the whole time.

In every boot I've looked at, the line comes right after the panel DCP loads its BLM M3 IMem, one line per load. On plain main that load first happens when the panel is powered back on; with the VRR fallback it also happens at the first mode set, so this commit only moves the first line to boot. It's the firmware's own line, not something this change adds.

Same picture on a MacBook Pro 16 M2 Max (main ea7aa36 against this commit): with the commit the panel comes up with vrr:1 instead of vrr:0, and the BLM load and the line come with it. On the two M4 Pro MacBook Pros (newer display firmware) nothing changes compared with main; they load BLM at boot on main already and never print the line. An M3 Max shows no difference from main either.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at fb3ad061469f

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: - drivers/gpu/drm/apple/iomfb.c (dcp_modes_replace()), drivers/gpu/drm/apple/parser-test.c (parser_vrr_empty_range()), tools/testing/selftests/drivers/gpu/apple-dcp/rate.py, and drivers/gpu/drm/apple/parser.c / dcp-refresh.h on main.

  • Verified dcp_refresh_range() in dcp-refresh.h already restricts the 0/0 fallback (24..rate) to internal && dcp_refresh_is_promotion(rate) (internal ~120 Hz ProMotion modes), so 60 Hz internal 13.5 panels and external displays are unaffected.

Follow-ups (not blocking): fork CI approval; isolate J314s FBPropertyManager warning from candidate tree

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at fb3ad061469f (B2 merge train, 12-01 merge bar). Approval at this head: aurora-silicon-review[bot]. Row: the hardware row at fb3ad06 that the readiness check found (PR body or comment). CI: linux train L4 = main (after L3) + 34 approved PRs (#3419 dropped: conflicts): Apple driver compile pass, Apple DTBs W=1 pass, planned KUnit ane-boot/clpc/ane-pm/dcp-fabric/dcp-topology/dcp-display/macaudio/asahi/sep all pass, host tests apple-dcp + apple-scaler-recovery pass (the red host-tests on some heads were base failures since fixed on main). The rest of the hosted run is queued behind the backlog. Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit 56ef9ef into aurora-silicon:main Dec 1, 2026
28 checks passed
maralcbr added a commit that referenced this pull request Dec 1, 2026
…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, trust the parser's VRR admission and
exact fractional min_vrr/max_vrr instead of forcing selected[0].vrr,
clear min_vrr/max_vrr 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>
maralcbr added a commit that referenced this pull request Dec 2, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:display Area from CODEOWNERS (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants