Skip to content

drm/apple: EDR on the desktop 26.x panel the way macOS does (PQ highlights at the panel peak) - #777

Merged
RyanTheTide merged 4 commits into
aurora-wipfrom
j616s/edr-macos
Nov 1, 2026
Merged

RyanTheTide merged 4 commits into
aurora-wipfrom
j616s/edr-macos

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

HDR on the J616s panel was far too dark: PQ content was squeezed below SDR white. On stock fleet14b, full-field PQ 203 draws 2.7 W of backlight against 6.1 W for SDR white. After a display power cycle with HDR content up, it dropped further still.

Commits

  • AxxzyWasTaken's two commits from drm/apple: Drive desktop 26.x EDR panels at their peak #652, kept as authored. In EDR swaps they ask for the panel at its peak with the display EDR scale at SDR white over the peak. They only treat BT.2020 PQ as EDR.
  • Ours: drive EDR the way macOS does on this panel, per a capture on the J616s under macOS 27 and the clean-room DCP EDR notes:
    • With applied headroom H, a swap asks for brightness SDR white x H, display EDR 1/H and, while the frame uses EDR, headroom used H. PQ 100 lands at SDR white and highlights reach the 1600-nit peak, as on macOS.
    • H rises linear in stops, one step per swap, about 1 s from SDR to the peak. In the middle of a ramp the swap carries a brightness limit of 1.3x the brightness. A zero limit is never sent, whereas until now every brightness swap sent one.
    • When EDR ends, headroom used drops to 1.0 and H returns to 1.0 in the same swap. A ramped exit needs further swaps, and a still GNOME desktop may not send any, which would leave SDR content scaled down partway through the ramp.
    • After a power off the ramp starts again from 1.0. A direct jump to the peak doesn't take after a power on, on macOS either.

How tested. J616s (T6041, DCP 26.6.2), fleet14b kernel. The variants were tested as test appledrm modules. The final module, built from this branch's head with no test knobs, had a verification boot: settled 8 s readings, docked with both externals.

Backlight power (SMC PDBR), full-field patterns, brightness 300:

SDR white PQ 100 PQ 203 PQ 1000
stock fleet14b 6.1 W 2.7 W
this branch 6.09 W 6.11 W 13.14 W 26.08 W (firmware full-screen cap)

GNOME desktop: default 6.07 W, bt2100 12.32 W, bt2100 after a DPMS cycle 11.57 W (stock: 3.9 W after the cycle). Chromium (Wayland colour management) fullscreen on the TestUFO HDR page under bt2100: 14.31 W, so HDR content in the browser reaches EDR. External VRR from #776 still reselects VRR=YES and VRR=NO on the MSI with no failed commits.

Host selftests (tools/testing/selftests/drivers/gpu/apple-dcp/run.py) pass 84/84, and the arm64 LLVM W=1 build of drivers/gpu/drm/apple has no warnings.

Known issue, predates this. After a PQ session, full-field SDR white draws less backlight power (6.1 W to 4.2 W at brightness 300) until the next display power cycle. Stock fleet14b does the same; every swap sequence tried here does it, including the full macOS one; macOS doesn't. The remaining difference is the surface: macOS's EDR content was FP16 extended-linear, ours is tagged BT.2020 PQ. That experiment is next.

For compositors. PQ 100 is SDR white on this panel, as on macOS. mutter and KWin place SDR white at PQ 203, so a GNOME desktop in HDR mode is about twice as bright as in SDR. That gets reconciled on the compositor side as a separate item.

🤖 Generated with Claude Code

AxxzyWasTaken and others added 4 commits November 1, 2026 17:31
EDR swaps on a desktop 26.x panel carry the EDR scale (SDR white over
the peak) and the headroom, but leave the panel level at SDR white. The
firmware shows a PQ surface at (PQ nits / 100) x the EDR scale x the
panel level the swap asks for, so with that level the whole PQ range
ends up at or below SDR white. On a J616C at 100 nits, full-screen PQ
100, 400, 1000 and 1600 drew 0.30, 0.58, 1.22 and 1.88 W of backlight
power, against 1.81 W for SDR white.

Ask for the panel at its peak in EDR swaps as well, and keep the scale
at SDR white over the peak. PQ 100 then shows at the user's level at
any brightness, and highlights reach the peak:

  SDR level  SDR white  PQ 100  PQ 400   PQ 1000 (full screen)
  100 nits   1.81 W     1.81 W   7.77 W  20.2 W
  200 nits   3.53 W     3.59 W  17.1 W   22.9 W
  300 nits   5.33 W     5.33 W  22.6 W   23.1 W

A swap that carries a level of its own (a brightness change) gets the
peak in its place and the scale from its level, so a change on a still
HDR frame takes effect at once. Ending EDR puts the panel back at the
SDR level, and a swap that turns the panel off keeps its zero.

Signed-off-by: AxxzyWasTaken <[email protected]>
Hyprland 0.56, going from its HDR mode to a wide-gamut SDR mode
(cm = "dp3"), sets the connector's Colorspace back to Default but
leaves the PQ HDR_OUTPUT_METADATA blob in place. The panel EDR path
decides on the metadata alone, so it kept tagging the SDR frames as PQ
BT.2020 and driving the panel at its peak. On a J616C at 100 nits the
backlight drew 22 W, the image had a green cast, and brightness
changes did nothing.

Show PQ content as EDR only while BT2020_RGB is asked for as well. A
Colorspace change already forces a mode set, so the decision is taken
again whenever either property changes. External PQ output is
unchanged.

Signed-off-by: AxxzyWasTaken <[email protected]>
EDR on the J616s panel asked for the peak in one swap and left it there,
with the display EDR scale anchored so that PQ 203 met SDR white, a zero
brightness limit in every brightness swap, and a jump straight to the
peak again after a power off. After a DPMS cycle with HDR content up, the
panel then stayed at about a third of its EDR level (GNOME bt2100:
backlight 11-13 W before, 3.9 W after), because a direct jump to the
peak does not take after a power on.

Follow the sequence macOS uses on this panel (captured on the J616s under
macOS 27): with applied headroom H, brightness SDR white x H, display EDR
1 / H and, while the frame uses EDR, headroom used H; H moves linear in
stops, one step per swap, about 1 s up and 2 s down, with a brightness
limit of 1.3 x the brightness in the middle of a ramp and never a zero
limit; headroom used drops to 1.0 as soon as EDR ends; after a power off
the ramp starts again from 1.0. PQ 100 now lands at SDR white, as on
macOS.

On the J616s (fleet14b, DCP 26.6.2) a DPMS cycle with GNOME in bt2100
keeps the panel at 8.7 W instead of dropping to 3.9 W. Full-field SDR
white draws less after a PQ session until the next display power cycle
(6.1 W to 4.2 W at the same brightness); stock fleet14b does the same, so
that predates this change and stays open.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The EDR exit ramped H down one step per swap, as macOS does. macOS's
compositor keeps presenting until its ramp ends; GNOME on a still desktop
may send no further swap, and with headroom used already back at 1.0 a
ramp left partway would keep SDR content scaled down. Return H to 1.0 in
the swap that ends EDR, which macOS also does for an immediate
transition.

On the J616s (fleet14b) the GNOME desktop after leaving bt2100 draws the
same backlight power with an exit ramp and without one, and a full-field
SDR white after EDR settles as on stock.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide merged commit a20c29a into aurora-wip Nov 1, 2026
@RyanTheTide
RyanTheTide deleted the j616s/edr-macos branch November 1, 2026 07:11
notmysegv pushed a commit to notmysegv/linux that referenced this pull request Nov 4, 2026
…tion/aurora

Bring integration/aurora up to aurora-wip b359258, the source of
7.3.0-aurora-fleet14f, promoted on the M1 Pro, M2, Neo and J616s on
2026-11-01 and 11-02. The range also covers the fleet14c, fleet14d and
fleet14e sources (f41ac3d, 4759557, 757fc07), each booted on
hardware. It adds aurora-silicon#773, aurora-silicon#776, aurora-silicon#777, aurora-silicon#737, aurora-silicon#713, aurora-silicon#785, aurora-silicon#786, aurora-silicon#788,
aurora-silicon#789 and aurora-silicon#787. No conflicts.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
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