Skip to content

drm/apple: read the panel colour target from raw ADT (sRGB/P3 primaries in every internal EDID) - #1105

Merged
RyanTheTide merged 2 commits into
integration/aurorafrom
bootlog2/panel-gamut-adt
Nov 7, 2026
Merged

RyanTheTide merged 2 commits into
integration/aurorafrom
bootlog2/panel-gamut-adt

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

The internal-panel EDID that linux#1016 publishes carries all-zero colour primaries on the Neo (J700) and the M2 (J413), so GNOME logs Failed to create device color profile: ... EDID ... contains bogus Color Characteristics on every login and colord has no profile for the built-in display. linux#1021 added a board-DT apple,color-gamut for the M4 Pro/Max panels only, and that DT reaches the J616s only through a Stage 2 DT refresh.

This reads the boot-populated /product artwork-display-gamut from the raw ADT, but only when the paired version-1 primary calibration matrix has a valid bounded shape, and keeps only the standard sRGB or Display P3 target. The DCP firmware already applies the per-panel matrix itself, so the coefficients are never kept or submitted as a DRM CTM. Complete firmware chromaticities stay authoritative. The short-lived board-DT gamut fallback (and its binding property) is replaced, so every internal panel gets its target without per-board DT data.

Origin: aurora-ctl t-5033 (clean-room, synthetic fixtures only), cherry-picked onto integration/aurora 43c790f.

Tests:

  • KUnit parser tests and the apple-dcp selftests cover P3, sRGB, bounds, provenance, firmware precedence and both publication paths (synthetic fixtures).
  • Hardware: one-shot test kernel 7.3.0-aurora-b2t1 on the Neo and M2 now, the J616s after 05:00: expect edid-decode sRGB (Neo) / P3 (J616s) primaries with D65 white, a colord RGB profile, no "bogus Color Characteristics", identity/modes unchanged from drm/apple: publish an identity EDID for every internal panel #1016, 0 AVC. Results will be added here before this leaves draft.

🤖 Generated with Claude Code

Read the boot-populated /product artwork-display-gamut only when the paired version-1 primary calibration matrix has a valid bounded shape. Retain only the standard sRGB or Display P3 target: DCP already owns the per-panel matrix at its factory location, so never submit it as a DRM CTM.

Use the raw target for H17P and desktop firmware while keeping complete firmware chromaticities authoritative. Replace the short-lived board-DT gamut fallback and cover P3, sRGB, bounds, provenance, firmware precedence and both publication paths with synthetic fixtures.

Assisted-by: LLM

Signed-off-by: Ryan Murray <[email protected]>
(cherry picked from commit 3f0394c)
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

M2 (J413, MacBook Air M2) one-shot of test kernel 7.3.0-aurora-b2t1 (integration 43c790f + this + #1103/#1104 + the Thunderbolt dfl_wq fix), 11-07 23:46, silent:

  • apple-dcp 231c00000.dcp: panel ADT: parsed, panel node absent, dimensions 290x189 mm
  • edid-decode on card1-eDP-1: Gamma 2.20, Red 0.6796/0.3203, Green 0.2646/0.6904, Blue 0.1503/0.0595, White 0.3125/0.3291 (Display P3, D65); manufacturer APP, product 'Apple Panel', dimensions unchanged from drm/apple: publish an identity EDID for every internal panel #1016.
  • colord: the Apple Panel device exists with an EDID-derived (embedded) profile; GNOME no longer logs 'EDID ... contains bogus Color Characteristics' (fleet22: once per login).
  • SELinux enforcing, 0 AVC, 0 failed units; no new kernel warnings.
    Neo next, J616s after 05:00 (P3 must stay P3 without the DT property).

@RyanTheTide
RyanTheTide marked this pull request as ready for review November 7, 2026 13:03
@RyanTheTide
RyanTheTide marked this pull request as draft November 7, 2026 13:03
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Neo (J700), same b2t1 one-shot 00:01: panel ADT: parsed, panel node absent, dimensions 279x175 mm; EDID Red 0.6396/0.3300, Green 0.2998/0.5996, Blue 0.1503/0.0595, White 0.3125/0.3291, gamma 2.20 (sRGB/Rec.709, D65); colord has the Apple Panel device with an embedded EDID profile; no 'bogus Color Characteristics'; 0 AVC. Stays draft until the J616s check after 05:00 (P3 must hold without the board-DT property this removes).

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Offline pre-check for the J616s (hardware run after 05:00): the live-device ADT dumps in our reference collection carry /product artwork-display-gamut = P3 plus a primary-calibration-matrix on T6041 J616C and T6040 J773s (and on the M1 J313), so the raw-ADT path should keep the M4 Pro panels at Display P3 without the board-DT property this PR drops.

Brings in #1140, which adds the J614c with apple,color-gamut on its
panel, plus the other integration work since this branch's base.

This branch reads the gamut from the ADT and drops the property from
the binding and the J614s, J616s and J616c. Drop it from the J614c too,
so it no longer carries an undocumented property the driver ignores.

Signed-off-by: Diljit Singh <[email protected]>
@RyanTheTide
RyanTheTide marked this pull request as ready for review November 7, 2026 17:05
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Ready for the merge train. Proven on the M2 (P3) and the Neo (sRGB). On the J616s this cannot regress today's default: fleet22's J616s boot (11-08 04:02) still logs 'EDID ... contains bogus Color Characteristics' because its Stage 2 DTB predates #1021's apple,color-gamut, so the panel currently publishes zero primaries either way; with this PR the target comes from the ADT, which on the T604x/T6041 live ADTs we hold carries artwork-display-gamut = P3 and a v1 calibration matrix. The J616s P3 readout will be checked on the first fleet kernel that carries this (FLEET4 suite) or on a J616s slot for b2t5, whichever comes first.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Merged integration/aurora (95e30d5) into this branch as f495573. There were no textual conflicts, but #1140 added the J614c with apple,color-gamut = "display-p3" on its panel, so I dropped it there as well, matching what this PR does for J614s/J616s/J616c. Locally: 0 new dtc or CHECK_DTBS warnings, drivers/gpu/drm/apple/ builds with no warnings, and the apple-dcp host suite is 86/86, the same as integration.

@RyanTheTide
RyanTheTide merged commit 3b2861c into integration/aurora Nov 7, 2026
2 checks passed
@RyanTheTide
RyanTheTide deleted the bootlog2/panel-gamut-adt branch November 7, 2026 17:35
DjDeveloperr added a commit that referenced this pull request Nov 7, 2026
Take #1132 (disabled M4 Max scalers), #1148 and #1105 (panel gamut from
the ADT), and carry their M4 changes into the new layout:

- ps_msr0's ps_msr0_dart label and comment, and scaler0_dart's
  power-domains = <&ps_msr0_dart>, go to t6040-pmgr.dtsi and t6040.dtsi,
  where those T6040-only nodes now live;
- t6041-j614-j616-j575-scaler.dtsi is included by the J614c and J616c
  board files, after t6041.dtsi as before;
- apple,color-gamut goes from the shared J614c/J616c panel.

Each M4 dtb differs from the integration/aurora tip exactly as it
differed from this branch's previous base.

Signed-off-by: Diljit Singh <[email protected]>
RyanTheTide added a commit that referenced this pull request Nov 7, 2026
Merge train 11-08 (ORCH). Neo (GPUX): refused-queue spins during the 2 s wait 2.0M -> 12, one-shot clean, Enforcing, 0 AVC. J616s (test kernel 7.3.0-aurora-mtrl3 = integration 95e30d5 + this + #1147 + #1105, one-shot, FLEET4 reg.sh vs fleet27): kerr 0, kwarn classes = base, dEQP-VK timeline_semaphore 3835 Pass = base, 0 GPU faults, gpubench and glmark within fleet27's own spread. Reviewed: a refused creator now holds nothing, and render_fits(open + 1) is the same bound as before. Host-tests CI green.
RyanTheTide added a commit that referenced this pull request Nov 7, 2026
Brings aurora-wip up to the 11-08 morning integration tip: DT
descriptions for every Mac family (#1094, #1097, #1111, #1131, #1132,
#1148, #1149, #1155, #1156, #1157, #1172), the J616s scaler (#1168), the
panel primaries from boot data (#1105), AVD macOS command parity
(#1116), AVD dma-coherent (#1169), the M2 PMU RTC alarm (#1151), G17
admission without spinning (#1146) and the AOP map wait (#1147).

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