Skip to content

drm/apple: Give a sink with a fast preferred mode a firmware-derived EDID - #1643

Draft
DjDeveloperr wants to merge 1 commit into
integration/aurorafrom
m5/dcp-edid-dtd-fit
Draft

DjDeveloperr wants to merge 1 commit into
integration/aurorafrom
m5/dcp-edid-dtd-fit

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

What

Give a sink whose preferred mode is faster than an EDID detailed timing can hold a firmware-derived EDID, instead of none.

The firmware-derived EDID's detailed timing is the sink's preferred mode, or failing that its best-scored IsPreferred timing. An EDID detailed timing holds at most 655.35 MHz. For a faster preferred mode, dcp_metadata_timing() refused the timing and no EDID was built at all.

On the M5 Pro that sink is the Odyssey G81SF, whose preferred mode is 3840x2160@120 at 1188 MHz. Its DisplayAttributes parse fine (seen 0x1f, PQ supported), but its connector had no EDID. Without one, compositors keep it in sRGB and offer no HDR (Hyprland listed it with an empty description).

The fix:

  • dcp_firmware_metadata_timing() now picks the detailed timing only among timings that slot can hold: the preferred one first, then the best-scored. A sink's own EDID does the same, listing faster modes in extensions. DRM's modes come from the firmware's timing catalog either way.
  • dcp_metadata_timing_fits() is split out of dcp_metadata_timing() and covers its checks except the image size.
  • A kunit case covers it: a 594 MHz 4K@60 timing fits; the same timing at 1188 MHz, or with no sync polarity, does not.

Status: draft until tested

  • Build-checked as appledrm.ko on the default kernel's tree (7.3.0-m5-intg4, f1b79c4), applied alone onto intg4's apple directory: no errors, and no warnings from this change. The kunit file is not in that config; host-tests will build and run it.
  • Not yet tested on hardware. The G81SF, the sink it fixes, was unplugged by the owner on 11-12. The diagnosis is from slot h3 (11-12, intg3): the DisplayAttributes parsed, and the preferred timing was 3840x2160@120, 1188 MHz. This PR leaves draft once the G81SF is reconnected and gets an EDID with its HDR static metadata.

🤖 Generated with Claude Code

…EDID

The firmware-derived EDID's detailed timing is the sink's preferred
mode, or its best-scored IsPreferred timing. An EDID detailed timing
holds at most 655.35 MHz, so a sink whose preferred mode is faster got
no EDID at all: dcp_metadata_timing() refused the mode, and the
connector had none. On the M5 Pro that is the Odyssey G81SF, preferred
3840x2160@120 at 1188 MHz, whose DisplayAttributes parse fine (PQ
included). Without an EDID, compositors keep it in sRGB and offer no
HDR.

Pick the detailed timing only among the timings it can hold, the
preferred one first and then the best-scored. A sink's own EDID does
the same, listing faster modes in extensions. DRM's modes come from the
firmware's timing catalog either way.

Signed-off-by: Diljit Singh <hey@djdev.me>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Blockers: 1.

  1. This change is already in integration/aurora through drm/apple: give an external sink a firmware-derived EDID with what it reports #2032 (cf76b17, merged 2026-11-16). The base has dcp_metadata_timing_fits() (drivers/gpu/drm/apple/dcp-display-metadata.c:235, declared in dcp-display-metadata.h:59), and dcp_firmware_metadata_timing() already skips timings a detailed timing descriptor can't hold before it picks the preferred or best-scored one (drivers/gpu/drm/apple/dcp.c:1158-1165). That is the same selection this PR adds. The branch now conflicts with the base, and its host-tests run failed in apple-dcp. Please close this PR. The KUnit case in parser-test.c (594 MHz fits; 1188 MHz or no sync polarity does not) is not on main; send it as a small test-only PR against the merged helper.

HW row: none for this PR; the open item is the G81SF (3840x2160@120) on the M5 Pro getting an EDID with HDR static metadata on the merged code.

Assisted-by: LLM (Claude:Opus 5.5)

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