Repository navigation
drm/apple: describe an internal panel without a known gamut as Display P3 - #2320
RyanTheTide wants to merge 1 commit into
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 Assisted-by: LLM Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: chrisohearn <137103567+chrisohearn@users.noreply.github.com> [ryan: taken alone from #2087, onto the current integration/aurora; booted on a K114s by the author, see #2087] Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Blockers: 1.
The code is right. Nit: the HW row: the K114s run in #2087 used this code on a 7.3.0-17 base. Before this merges, it needs one boot of this head on the K114s (EDID primaries P3, Hyprland Assisted-by: LLM (Claude:Opus 5.5) |
|
Replaced by #2798: the same changes with the commit trailers fixed, on the current integration/aurora. |
Fixes #2060
This is the first commit of #2087, by @chrisohearn and under his authorship, on its own and on the current
integration/aurora. It fixes the zero-primaries EDID without the second commit's EDR peak cap, so the fix can land while the cap is discussed in #2087.Problem
The EDID synthesised for an internal panel takes its primaries from the firmware or, without a complete set, from the colour target named by the ADT's
/productartwork-display-gamut.dcp_adt_gamut()knowsP3andsRGB; 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 (Hyprland's colour management,edidpreset) get a singular matrix and render black frames.Change
dcp_panel_color_target(): the space the ADT names, or else Display P3, the space every untagged RGB surface on an internal panel is already tagged with (iomfb_template.c). The EDID and the surface tag then agree.Rec2020is deliberately not mapped to BT.2020 primaries, since 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.Testing
panel ADT: no known colour gamut, EDID primaries default to Display P3;edid-decodered 0.6796/0.3203, green 0.2646/0.6904, blue 0.1503/0.0595, white 0.3125/0.3291; Hyprland 0.57.2 colour management with theedid,dp3andsrgbpresets keeps the panel lit with normal colours (black frames before).parser_panel_adt_color_targetcovers aRec2020ADT (Display P3 primaries, D65, gamma 2.2) and a known gamut keeping its own space. Compile check on integration/aurora0abc2f385e+ this change: every touched file built for arm64 (gcc, kernel warning flags,-Werror) with no warnings. The full KUnit run is still to do.Assisted-by: LLM (Claude:Opus 5.5)