Repository navigation
drm/apple: describe an internal panel without a known gamut as Display P3 - #2798
Draft
RyanTheTide wants to merge 1 commit into
Draft
RyanTheTide wants to merge 1 commit into
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 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #2320 (same changes, commit trailers fixed).
Fixes #2060
This is the first commit of #2087, by @chrisohearn and under their 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)