Repository navigation
drm/apple: m4: publish the internal panel's EDID - #3261
themartiano wants to merge 1 commit into
Conversation
Every internal panel has an EDID built from its identity, the colour target the ADT names and the firmware's timing. The M4 backend publishes none: its DCP node describes the panel itself, with no panel child, so the identity is never allocated, and its get_modes returns before the EDID. A compositor sees a nameless display without primaries. Allocate the identity for an M4 DCP whose node has the panel's size, fill it at bind as for the other panels, and publish the EDID with the one mode. The mode itself and the connector's size in millimetres stay as they were. The 26.6.2 timing carries no sync polarity, which a detailed timing must state, so the EDID was refused with -ERANGE (seen on a J713). Give the descriptor one, as the external firmware-derived EDIDs do; it is never programmed. Signed-off-by: Eduardo <git@martiano.me>
e4f16a3 to
90b27b8
Compare
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
satchlj
left a comment
There was a problem hiding this comment.
Reviewed 90b27b8a52c8 (drm/apple: m4: publish the internal panel's EDID):
- Property-driven
apple,panel-width-mmallocation ofdcp->panel_identity,dcp_metadata_timing_polarity(&summary)indcp_panel_identity_timing()(filling sync polarity only when absent without mutating the firmware mode, covered byparser_panel_timing_polarity), anddcp_m4_panel_edid()after the notch-twin mode block (withapple,panel-width-mm/height-mmrestored afterward) all look clean. - DCO and
Risk:are present, and the J713 M4 (firmware 26.6.2) EDID/P3 verification is documented. - Approved the pending fork workflow runs (
pr-text,Host tests,Apple build and KUnit); holding approval for CI to finish green at90b27b8a52c8.
maralcbr
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at 90b27b8a52c8
Blockers:
drivers/gpu/drm/apple/iomfb.c:2997: the J713 row predates the rebase (e4f16a33d7f5in a combined kernel); the rebase onto9177b2d474f8conflicted indcp_get_modes(), andiomfb.conmainhas moved since. Please post a J713 row at90b27b8a52c8(or a batched M4 candidate containing it unchanged): panel EDID published with name, size and Display P3 chromaticities, 0 failed units, 0 new kernel errors.drivers/gpu/drm/apple/dcp-display-metadata.c:442:dcp_panel_identity_timing()is shared by every internal panel's EDID, so please add one non-M4 laptop regression row at this head comparing/sys/class/drm/card*-eDP-1/edidsha256 againstmain(identical, 0 new kernel errors).
Once those rows are posted (and Host tests completes on a fresh run — run 46878188687 is stuck queued in GitHub Actions with 0 jobs and cannot be cancelled/re-run via API; if this merges after #3926 and #3260, resolving the trivial dcp.c + parser-test.c merge with main will also trigger a fresh Host tests run), this is ready to approve and merge without a full re-review.
Checked: code is clean with no blockers; no Apple material, no new chip/board/firmware gates, no new parameters, DCO matches author; probe/bind scoping, J604 EDR inertness, dcp_get_modes() ordering, shared polarity fallback, and KUnit coverage verified; Apple build and KUnit (including parser_panel_timing_polarity) and pr-text are green at 90b27b8a52c8.
Evidence
drivers/gpu/drm/apple/dcp.c:8907-8913:panel_identityallocation sits in theelse ifofif (!iomfb_is_m4(dcp))gated onapple,panel-width-mm; non-M4 Macs keep the panel-child path, anddcp_is_internal_panel_only()(dcp.c:7256) is only called on firmware 27.drivers/gpu/drm/apple/dcp.c:7608-7614: reads DT dimensions and callsdcp_panel_read_adt()beforeiomfb_m4_start(). On J604,edr_ceilingstays inert (dcp_panel_edr()requiresdcp_fw_swap_has_edr(), andpeak_nitsis only set on firmware 27), so no HDR/CTA block is emitted.drivers/gpu/drm/apple/iomfb.c:2997-3009:dcp_m4_panel_edid()publishes the full-timing EDID after #2814's notch mode block and before restoring exact DT mm and notch-free height (necessary becausedrm_edid_connector_update()resetsdisplay_infoto whole centimetres).drivers/gpu/drm/apple/dcp-display-metadata.c:442:dcp_metadata_timing_polarity(&summary)modifies only the stack copy and fills sync polarity only when absent, leaving panels with explicit sync polarity byte-identical.- Hosted CI at
90b27b8a52c8:Apple build and KUnitpass (apple-display-parser49/49 includingparser_panel_timing_polarity),pr-textpass;Host testsrun46878188687is stuckqueuedwith 0 jobs since 2026-12-03 02:37 AEST (cancel/force-cancel returns HTTP 409, rerun returns HTTP 403). - Merge check against current
main(6ee70d49c228): clean. Note this overlaps #3926 indcp.c(dcp_comp_bind_pipe()) and #3260 inparser-test.c; merging #3926 and[#3259](https://github.com/aurora-silicon/linux/pull/3259) -> [#3260](https://github.com/aurora-silicon/linux/pull/3260)first means only #3261 needs a single conflict merge (placingdcp_read_notch(dcp)beforeif (dcp->panel_identity)to match non-M4 bind order, and keeping both KUnit cases). - Non-blocking notes:
parser-test.c:1572:DRM_EDID_PT_SEPARATE_SYNCis clearer than0x18, and a negative-polarity case (NHSYNC|NVSYNC->0x18) would pin the "unchanged when stated" contract.- Note on Risk wording: if any non-M4 panel's firmware omits
SyncPolarity,parser.c:1249-1255leaves flags 0 and line 442 would give it an EDID too; the non-M4 row settles this.
There was a problem hiding this comment.
Verdict: MERGE at 90b27b8
Checked: The panel identity is allocated when the DCP node describes its dimensions. Missing sync polarity is filled only on the EDID's copied timing, leaving the firmware mode unchanged. The M4 path publishes the single real timing as EDID, keeps the notch-free virtual mode in its existing list, and restores millimetre dimensions after the EDID update. The current-head apple-build and DCP KUnit checks passed.
DjDeveloperr
left a comment
There was a problem hiding this comment.
Approving at 90b27b8a52c8. I read the whole diff and found nothing that has to change.
What I checked
- The identity is allocated only on the M4 path, and only when the DCP node has
apple,panel-width-mm(J713, J715 and J604 today). Every other Mac keeps the code it had. - The polarity is filled on a copy, only where the firmware's timing has none, so a panel that states one gets the same EDID bytes and the published mode keeps its flags. The new KUnit case covers both.
dcp_panel_read_adt()sets a peak only for firmware 27, so the 26.6.2 panels announce no HDR through this EDID, anddcp_panel_edr()stays false.dcp_get_modes()publishes the EDID after the notch-free mode and restores the millimetre size afterwards. A refused EDID clears the property and leaves the modes.- It merges cleanly on main
dc4d6f065001together with #3273, #3262, #2070 and #3951, anddrivers/gpu/drm/apple/compiles there (arm64, GCC,W=1, no warning in a line this PR touches).
Rows still owed before merge
- J713 on 26.6.2 at this head (or in a batch that contains it unchanged): the EDID with name, size and P3 primaries, 0 failed units, 0 new kernel errors. The earlier row was before the rebase.
- A laptop that isn't M4, for the shared polarity line: the sha256 of the internal panel's EDID identical to main's. We run this one, on our J516s or J700.
|
J700 (MacBook Neo, A18 Pro, T8140) row, 12-03: PASS for the EDID line (dsrows kit, base stock 7.3.0-41 vs the dsrows merge tree |
|
Local checks, this head merged with main
J700 is the non-M4 row (EDID identical on both arms, above). What is left is the J713 row on 26.6.2 at |
What: The M4 internal panel is the only internal panel without an EDID: its DCP node describes the panel itself, with no panel child, so no identity is allocated, and the M4
get_modesreturns before the EDID. A compositor sees a nameless display without primaries. Allocate the identity for an M4 DCP node that has the panel's size and publish the EDID; give the descriptor the sync polarity this firmware leaves out (without it the EDID was refused with -ERANGE).Tested: J713 (13-inch M4 MacBook Air, firmware 26.6.2) at
e4f16a33d7f5, 2026-11-25: PASS. eDP-1 publishes an EDID: manufacturer APP, "Apple Panel", 29x19 cm, Display P3 primaries (red 0.6797,0.3203, green 0.2646,0.6904, blue 0.1504,0.0596, white 0.3125,0.3291); Hyprland 0.57.2 uses it withcm = edid. The kernel (7.3.0-0.next2) was mainba29027e1580merged with all our M4 display and other branches and #2814, #2797, #2807, #2672, not this branch alone; thereget_modesis #2814's (notch-free mode, 2560x1600) with this EDID call. This commit's tree is identical to the one booted (cf096a6adf8b; only the Signed-off-by was added). Regression on that kernel: 0 failed units, no oops, crash or stall, 10/10 deep sleeps without kernel errors (no SELinux on this image). Host: KUnit, newparser_panel_timing_polaritypasses (566 run, 564 pass, 1 skip, 1 fail that main has too:apple-dcpaud-no-sio); apple-dcp host suite 95/95; W=1 build.Rebased onto main
9177b2d474f8on 2026-12-02; head now90b27b8a52c8. One conflict indcp_get_modes()with #2814's notch modes: the panel EDID is published after #2814's mode block, from the panel's full timing, as main does for the other panels (their EDID lists the panel's timings, not the notch-free twins). The J713 kernel in Tested already combined the two this way. Host checks re-run at the new head: W=1 arm64 build ofdrivers/gpu/drm/apple/, 0 warnings; checkpatch --strict clean; KUnitdcp-fabric,dcp-topology,dcp-display(the suites CI picks for these files) on arm64 QEMU: no failures (one case skips in each of two suites); apple-dcp host suite, no new failures (14 cases fail to compile with this container's newer compiler on main itself, and the same 14 here). The hardware rows above are from before the rebase.Risk: two-way door · M4 panels on firmware 26.6.2 (J713, J715, J604: the boards whose DCP node has
apple,panel-width-mm). Other Macs: the identity is allocated only on the M4 path, by that property, so no other Mac gets a new EDID from it; the iMac and Mac mini have no such property. The polarity is filled indcp_panel_identity_timing(), shared by every internal panel's EDID, but only where the firmware's timing has none: a panel whose timing states a polarity gets the same bytes as before (code reading, not run on another Mac). On the J604dcp_panel_read_adt()now also reads the EDR headroom;dcp_panel_edr()stays false without an EDR-capable swap, so no HDR is offered there.Not yet: a row on a non-M4 Mac for the shared polarity line; this branch alone on main (without #2814's
get_modes); a J604 or J715.Details
apple,panel-width-mmon the DCP node), not by compatible.dcp_metadata_timing_polarity(), as the external firmware-derived EDIDs do. The identity descriptor is never programmed.get_modes(resolution: drm/apple: control the panel notch at run time #2814's modes plus the EDID call).Evidence
J713 test run of 2026-11-25 on 7.3.0-0.next2:
Host, at the old head
cf096a6adf8b(same tree): KUnitapple*on arm64 QEMU 566 run, 564 pass, 1 skip, 1 fail (apple-dcpaud-no-sio, fails on main too); apple-dcp host suite 95/95; W=1 build clean; checkpatch--strictonly asked for the Signed-off-by (now added).