Skip to content

drm: apple: t8132: publish the sink's EDID on external outputs - #2166

Open
niteria wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
niteria:j713/ext-edid
Open

niteria wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
niteria:j713/ext-edid

Conversation

@niteria

@niteria niteria commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

The M4 (T8132) external DCP builds its modes from the firmware's timing catalog and never read the sink's EDID, so the connector had no EDID property: compositors saw no monitor name, serial or physical size and guessed the scale (Hyprland put a 1080p monitor at scale 2).

This tracks the dcpav-service-epic the firmware announces on EP 0x28 for each sink, reads its EDID with the generic path's inline/legacy reader (new dcpavserv_read_edid()), and passes its SDR view (dcp_edid_sdr(), as native26 does) to drm_edid_connector_update() from get_modes. The modes stay the firmware catalog's; with the raw EDID, the probe helper would prune the catalog modes the sink lists as 4:2:0 only.

The EDID is kept for the sink's link and read once per announcement of the AV service, which the firmware repeats after a relink or a resume: a failed read no longer blanks it, and probes no longer cost a firmware call. As on the Neo it probes again when the service is announced, and up to 5 times 500 ms apart while the firmware answers without EDID bytes because it has not read the sink yet. Nothing is read from a stopped or failed session, and the service announced before a deep sleep goes with the stop.

Tested on a J713 (MacBook Air M4) over USB-C HDMI adapters on both ports, with a Samsung LS28AG700N (4K, 512-byte EDID, 256 bytes in its SDR view) and a Samsung S24F350:

  • Hyprland shows each one's name, serial and size, picks scale 1 for 1080p, and applies a per-monitor rule (4K@30, scale 2) to the 4K after a boot with it attached and after a replug.
  • One EDID read per service announcement; later probes reuse it.
  • The firmware drops the 4K's link about 10 s into boot and announces the service again: the EDID stays published throughout (the first version of this PR blanked it while the monitor was still connected; A/B boot).
  • Replug, moving to the other port, and both monitors at once: the right EDID on each output.
  • Not tested: deep sleep (the test kernel has no M4 external DCP sleep fix).

The first version was also tested with an HP HDMI-VGA adapter.

Host tests (tools/asahi/run-host-tests.py, full run): 425/425 on both this branch and its base 432f175816e9.

Overlap checked against open PR heads: #1812 also edits epic/dpavservep.c (the generic discovery wait), with no functional overlap; #1192 and #1940 touch iomfb_m4.c / t8132_ext_drm.c but not EDID.

🤖 Generated with Claude Code

@niteria
niteria marked this pull request as ready for review November 17, 2026 18:32
The M4 external DCP builds its modes from the firmware's timing catalog
and never read the sink's EDID: the connector had no EDID property, so
compositors saw no monitor name, serial or physical size, and guessed
the scale (Hyprland put a 1080p monitor at scale 2).

Track the dcpav-service-epic the firmware announces on EP 0x28 for each
sink, read its EDID with the inline/legacy reader of the generic path
(new dcpavserv_read_edid()), and pass its SDR view (dcp_edid_sdr(), as
native26 does) to drm_edid_connector_update() from get_modes. The modes
stay the firmware catalog's: with the raw EDID, the probe helper would
prune the catalog modes the sink lists as 4:2:0 only, as the connector
does not allow 4:2:0.

Keep the EDID for the sink's link and read it once per announcement of
the AV service, which the firmware repeats after a relink or a resume:
a failed read no longer takes the EDID from the connector, and a probe
no longer costs a firmware call. As on the Neo, probe again when the
service is announced, as get_modes may already have run without it,
and, up to 5 times 500 ms apart, while the firmware answers without
EDID bytes because it has not read the sink yet. Nothing is read from
a stopped or failed session, and the service announced before a deep
sleep goes with the stop.

Tested on a J713 over USB-C HDMI adapters on both ports with a Samsung
LS28AG700N (4K, 512-byte EDID, 256 bytes in its SDR view) and a Samsung
S24F350: Hyprland shows each one's name, serial and size, picks scale 1
for 1080p, and applies a per-monitor rule (4K@30, scale 2) to the
LS28AG700N after a boot with it attached and after a replug. The EDID
is read once per announcement and stays published through the
firmware's relink about 10 s into boot.

Assisted-by: LLM
Signed-off-by: Bartosz Nitka <niteria@gmail.com>
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Works on a J773g (Mac mini M4) with #1192: HDMI to a G81SF, EDID published (256 bytes, the SDR view). KWin reads it; it warns only about the zeroed colorimetry, as intended. The EDID was published on every boot of the mini's new default kernel (this PR + #1192 + #2296), 5 boots, and it stays across suspend-to-idle.

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