Repository navigation
drm/apple: publish an identity EDID for every internal panel - #1016
Conversation
Only the desktop 26.x (J616s) panel published a firmware-derived EDID.
Every other internal panel (the Neo's H17P, and the M1/M2 laptops) had
none, so its connector reported no vendor, product or serial. GNOME
keys per-display state on those: on the Neo gnome-shell's brightness
manager threw "Argument string may not be null" on every brightness
change and never saved the level, and colord could not profile the
panel ("EDID length is too small").
Move the panel identity out of the desktop-only state into a
dcp_panel_identity that any processor with an internal panel allocates
at bind, filled from the boot loader's ADT exactly as on the J616s.
Firmware ProductAttributes and a raw panel EDID still replace the ADT
fallback where the firmware reports them. The identity EDID keeps the
firmware's TimingElements as the only enumerated modes and the
connector's exact OF/ADT dimensions, as before.
The J616s keeps its published product code; other panels report 0
rather than borrow it.
KUnit: the J616s publication test now runs for H17P and 13.5 too, and a
DCP without a panel identity publishes nothing.
Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
|
Neo (J700, H17P) one-shot test boot of
M2 (13.5 template path) regression still to come before merge. |
|
J616s (desktop 26.x, the path this PR refactors) one-shot of the same
M2 (13.5 template, the other newly enabled path) is stranded until someone presses its power button. KUnit |
…eight The panel identity was allocated with devm in dcp_comp_bind_pipe(). Component bind runs inside a devres group on the DCP device that is released when the bind fails (an M1/M2 internal pipe can return -EPROBE_DEFER after it) or the component is unbound, but the pointer in struct apple_dcp survived it: the next bind reused freed memory. Allocate it at probe, like the desktop state, for any DCP with an internal panel node except the M4 IOMFB, and only fill in the ADT identity at bind. With the notch hidden the published modes are trimmed, so an ADT /panel height-mm must not replace OF's adj-height-mm. No current ADT we read has one (the Neo and J616s have no /panel node), but the M1/M2 notched laptops now reach this path. On the newly covered firmwares the ADT identity is replaced only by DisplayAttributes ProductAttributes; a raw panel EDID is still read on desktop 26.x only. Host selftests: the desktop panel, colorimetry and J616s identity fixtures model struct dcp_panel_identity (taken from the header), and the external rate fixtures carry a NULL identity. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
|
Adversarial review found a use-after-free; fixed in 0492d3a (new commit, no history rewrite):
Hardware: the Neo and J616s boots above ran the first commit; a rebuild with both commits ( |
|
Final code (both commits,
With the Neo boot of the first commit (Neo now on a Touch ID hold), host selftests 86/86 and KUnit 38/38 on the head, merging. M2 (13.5) check follows when the M2 is powered back on. |
|
Post-merge M2 (MacBook Air M2, 13.5 template path) one-shot of the same |
Bring in #1016, which keeps the internal panel identity in struct dcp_panel_identity and builds the panel EDID for every internal panel. The colour target needs no change: it is kept with the panel dimensions and passed to dcp_panel_edid() from dcp_panel_edid_snapshot(). Resolve the host fixture conflict in apple-dcp/desktop.py by taking the dcp_panel_identity stub from integration/aurora and adding the panel color_target field and the NULL colour target argument to dcp_panel_edid(). Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Only the desktop 26.x (J616s) internal panel published a firmware-derived EDID. Every other internal panel (Neo H17P, M1/M2 laptops) exposed none (
/sys/class/drm/card*-eDP-1/edidis 0 bytes), so its connector has no vendor/product/serial.User impact on the Neo (GNOME 51):
JS ERROR: Error: Argument string may not be null(brightnessManager.js_setState) on every brightness change, so the panel brightness is never saved across logins.failed to get edid data: EDID length is too small, no display profile.Change:
struct dcp_panel_identity(metadata, ADT fallback, generation, raw EDID), allocated at bind by any DCP with an internal panel, instead of living in the desktop-only state.dcp_panel_adt_identity()now runs for every internal panel (not M4 IOMFB). The Neo's ADT carries/product raw-panel-serial-number, the same source the J616s uses.dcp_get_modes()and the DisplayAttributesProductAttributespath key on the panel identity, not onDCP_FIRMWARE_V_26_6_DESKTOP.Tests:
apple-display-parser38/38: the J616s publication test now also runs for H17P and 13.5 (no desktop state), plus a DCP without a panel identity publishes nothing.🤖 Generated with Claude Code