Repository navigation
drm/apple: describe an internal panel without a known gamut as Display P3 - #2798
Conversation
…y P3 The EDID built for an internal panel takes its primaries from the firmware or, without a complete set, from the colour target the ADT's /product artwork-display-gamut names. A gamut string the driver does not know leaves no target, and the EDID then carries zero red, green and blue primaries with only the D65 white. The K114s (MacBook Pro 14-inch OLED, M5 Pro, firmware 27.2) is such a panel: its ADT says "Rec2020", with a valid version-1 primary-calibration-matrix. Compositors take the zero primaries at face value. Hyprland's colour management builds its conversion matrix from them, the matrix is singular, and every frame comes out black while the firmware completes each swap. Every untagged RGB surface on an internal panel is already tagged P3-D65 (iomfb_template.c: "the panel's own primaries (P3-D65, as its EDID reports)"). Describe a panel whose ADT names no known space in that same space, so the EDID and the surface tag agree, and log it. The Rec2020 string is not mapped to BT.2020 primaries: the firmware is handed P3-tagged surfaces, so BT.2020 primaries in the EDID would make compositors encode for a wider space than the one the pixels are shown in. dcp_panel_edid() keeps its contract (no target, white only) for its other callers and tests. KUnit: parser_panel_adt_color_target covers a "Rec2020" ADT (no target of its own, Display P3 primaries, D65 and gamma 2.2 in the EDID) and a known gamut keeping its own space. Not booted: built, and the Apple display KUnit suites pass in QEMU. Closes: #2060 Signed-off-by: chrisohearn <[email protected]> [ryan: taken alone from #2087, onto the current integration/aurora; booted on a K114s by the author, see #2087] Signed-off-by: Ryan Murray <[email protected]>
|
Review at 128023e (non-author, draft). No blocker found; ready once the KUnit run and one unchanged-EDID row are in.
Small points, not blocking:
Assisted-by: LLM (Claude:Opus 5.5) |
Signed-off-by: Ryan Murray <[email protected]> # Conflicts: # drivers/gpu/drm/apple/dcp.c
|
Forward-merged main ( Hardware row: K114s (T6050, M5 Pro OLED), firmware 27.2. Test kernel 7.3.0-k114sdisp = main
The Mutter colour-mode list on this boot follows once the owner is logged in. |
|
Merge-train review at Checked
Before merge
The K114s row covers the fixed case. |
|
J616s regression row (M4 Pro, desktop 26.x firmware, known-gamut mini-LED panel). Test kernel 7.3.0-j6disp = main + linux#3367 (
Files: traces/display/20261127-k114s-dcp/j616s-fleet89-before.txt and j616s-j6disp-after.txt (lab store). |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
What
The EDID that the driver synthesises for an internal panel takes its primaries from the firmware or, if that set is incomplete, from the colour target named by the ADT's
/productartwork-display-gamut.dcp_adt_gamut()knows onlyP3andsRGB. Any other string leaves no target, and the EDID carries zero red, green and blue primaries with only the D65 white. The K114s (M5 Pro OLED, firmware 27.2) saysRec2020. Compositors that build a conversion matrix from the EDID primaries get a singular matrix: Hyprland'sedidpreset renders black frames, and GNOME offers no "SDR native" (wide-gamut) colour mode.dcp_panel_color_target()returns the space the ADT names, or else Display P3. Every untagged RGB surface on an internal panel is already tagged P3 (iomfb_template.c), so the EDID and the surface tag then agree.Rec2020is deliberately not mapped to BT.2020 primaries, because the pixels are shown as P3. Adev_infonames the fallback. The choice depends only on the ADT string, so it applies to every internal panel on every SoC.Author: Chris O'Hearn (from #2087, under their authorship). Fixes #2060. Replaces #2320. Forward-merged with main (
a5ee0c10, no force push).Tested
Tested: K114s at a5ee0c1-equivalent (
dcp_panel_read_adt()identical), firmware 27.2: "panel ADT: no known colour gamut, EDID primaries default to Display P3"; the panel EDID primaries become P3 (red 0.6797/0.3203; zero before). KUnit at a5ee0c1: 373 tests, 372 passed, 1 skipped. Details: #2798 (comment)Risk: two-way · internal panels whose ADT names a gamut the driver doesn't know (K114s and other T6050 OLED boards); panels with P3/sRGB unchanged
Not yet