Repository navigation
drm: apple: t8132: publish the sink's EDID on external outputs - #2166
Conversation
0c1d35c to
6b8638a
Compare
|
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. |
|
Blockers: 1.
The lifetimes and locking hold up. The service is pinned with Nit: iomfb_m4.c:3298-3299 repeats the generic path's HW row: J713 on this head, plus suspend and resume with the external display attached, once the M4 external DCP sleep fix is in (deep sleep has not been tested). The EDID should still be published after the wake with no extra read failures logged, 0 SELinux denials, 0 failed units, 0 new kernel errors. Assisted-by: LLM (Claude:Opus 5.5) |
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. Signed-off-by: Bartosz Nitka <niteria@gmail.com>
6b8638a to
9da0aef
Compare
|
Done in 9da0aef:
Nit: HW row, J713 (MacBook Air M4) with #2200, the Samsung LS28AG700N (4K) on a USB-C HDMI adapter, three deep sleeps woken by the PMU RTC:
The kernel was the Air's: a7dd26e with this PR's patch, #2200 as reviewed and #2205. This head compiles to the same code, and #2200's current head differs only by the chip term you asked to drop, which is always true on T8132. Host tests (full run): 425/425 on this branch and its base. Assisted-by: LLM (Claude:Opus 5.5) |
|
Re-review of 9da0aef: No blockers.
Against 6b8638a, on the same base 432f175, the only code change is that move. The EDID lifetime and locking are unchanged from what was checked before. The deep-sleep row asked for is in the PR: J713 with #2200, the 4K sink on a USB-C HDMI adapter, three RTC-woken deep sleeps. The same 256-byte EDID was published after each wake, with no display-stack warnings or errors, 0 failed units, and only the 4 kernel error lines this Air logs on every sleep (also logged without the display attached). SELinux is not enabled on that install, so there are no denials to count. Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Review of 9da0aefd against the pre-PR checklist (§1–§6): looks good, ready to merge.
- Lifetimes, locking, and bounds (§1–§3): Clean and property-driven (no board/model/firmware-version gates added). Tracks
dcpav-service-epiconDPAVSERV_ENDPOINT(0x28) for adopted external DCPs (iomfb_m4.c), pinsservicewithafk_service_get()/put()understate_lockonly while!dcp->error && !READ_ONCE(dcp->gated), caches and swapsext_edidunderext_modes_lockkeyed onext_link_gen(freeing the old EDID outside the lock and discarding reads ifext_link_genchanged), clearsext_avserviniomfb_m4_ext_stop(), and cancelsext_edid_retryafterdcp_m4_failed()iniomfb_m4_quiesce(). Sharesdcpavserv_read_edid()andDCPAVSERV_EDID_RETRIES/DCPAVSERV_EDID_RETRY_MSviaepic/dpavservep.h. Thedcp_edid_sdr()copy length(raw->extensions + 1) * EDID_LENGTHis bounds-checked bydcpavserv_read_edid_legacy()anddrm_edid_valid(). - Overlap / superseded check: Not superseded on
integration/aurora(iomfb_m4.c/t8132_ext_drm.cstill have no EDID read). Checked against openaurora-silicon/linux#2783(c1183283): no conflict or functional overlap —#2783updatesdcpavserv_identity()(epic/dpavservep.c:44-78) andapple_drv.cfor the genericdpavservepfirmware-27.x path, while#2166addsdcpavserv_read_edid()(epic/dpavservep.c:581) and wires up theiomfb_m4/t8132_ext_drm(T8132 26.6.2) external output path. Compatible with merged#2200(118b39f5f7). - Attribution & naming (§4, §6): Single commit
9da0aefdcarries human author/committer and humanSigned-off-by:only (zero agent trailers); PR body carriesAssisted-by:. - Evidence & CI (§5): Covered on J713 (both USB-C ports, 4K + 1080p sinks, relink retention, replug, dual monitors, and 3 PMU-RTC deep sleeps with
#2200: 0 failed units, 0 display warnings/errors, 0 new kernel errors vs baseline) and J773g (5 boots + s2idle with#1192). CIhost-testsis green on9da0aefd.
Assisted-by: LLM (Gemini 4 Neon)
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-epicthe firmware announces on EP 0x28 for each sink, reads its EDID with the generic path's inline/legacy reader (newdcpavserv_read_edid()), and passes its SDR view (dcp_edid_sdr(), as native26 does) todrm_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, with the generic path's bounds (
DCPAVSERV_EDID_RETRIES/DCPAVSERV_EDID_RETRY_MSinepic/dpavservep.h: 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:
The first version was also tested with an HP HDMI-VGA adapter. DjDeveloperr tested it on a J773g (Mac mini M4) with #1192: HDMI to a G81SF, the 256-byte SDR view published on 5 boots and across suspend-to-idle, KWin warning only about the zeroed colorimetry.
Host tests (
tools/asahi/run-host-tests.py, full run): 425/425 on both this branch and its base432f175816e9.Overlap checked against open PR heads: #1812 also edits
epic/dpavservep.c(the generic discovery wait), with no functional overlap; #1192 and #1940 touchiomfb_m4.c/t8132_ext_drm.cbut not EDID.Assisted-by: LLM (Claude:Opus 5.5)