Repository navigation
drm/apple: m4: read the notch rows of the M4 panel too - #3926
themartiano wants to merge 1 commit into
Conversation
The notch-free geometry is wired up on the M4 (firmware 26.6.2) path: the modes, the check, the swap's destination row. But the bind of an M4 DCP returns before apple,notch-height is read, so notch_rows is always 0 there, the notch-free twin is never offered and the panel has no "notch" property. Read them before iomfb_m4_start(). Seen on a J713 (26.6.2) with an earlier tree and another implementation of the same swap: the firmware shows a 2560x1600 frame at destination row 64 with the rows above it black, also across DPMS. Signed-off-by: Eduardo <git@martiano.me>
|
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 f7e22b4ff26a (drm/apple: m4: read the notch rows of the M4 panel too):
- Extracting
dcp_read_notch()from the existing bind path and calling it beforeiomfb_m4_start()indcp_comp_bind_pipe()is minimal, property-driven (apple,notch-height), and leaves non-M4 DCP bind order unchanged. - DCO and
Risk:are present, and the J713 M4 (firmware 26.6.2) verification is documented. - Approved the pending fork workflow runs (
pr-text,Host tests,Apple build and KUnit); holding approval for CI to finish green atf7e22b4ff26a.
maralcbr
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at f7e22b4ff26a
Blockers:
- Hardware row at head: the 2026-11-26 J713 row tested the same
dcp.cchange inside a combined pre-merge kernel (ba29027e1580+ #2814 + other open branches). Before #2814 merged, it gained7bc3341694bf("publish notch policy before atomic completion" inapple_drv.c, touching the runtime notch-switch path), andmainhas since merged #3321 intoiomfb_m4.c. Please post a short J713 (26.6.2) row atf7e22b4ff26a(or a batched M4 candidate containing it unchanged on currentmain): boot notch log line, default2560x1600withscanout_y 64, sysfsnotchswitch both ways, one DPMS cycle, and one deep sleep. - One-way default sign-off: on J713, J715, and J604 with firmware 26.6.2 (where the loader writes
apple,notch-height), this changes the default visible mode to notch-free unlessasahi,show-notchis set. Needs an approving review that explicitly accepts this one-way default change (noting J715 and J604 have not yet been booted with a nonzerodst_yswap).
Once the head row is posted and the one-way default is signed off, 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; dcp_read_notch() extraction, M4 bind order, dcp_notch_dynamic(), external/desktop M4 isolation, unbind cleanup, and clean apply on current main (6ee70d49c228) verified; hosted CI (Apple build and KUnit, Host tests, pr-text) is green at f7e22b4ff26a.
Evidence
drivers/gpu/drm/apple/dcp.c:7587-7599, :7698:dcp_read_notch()is #2814's block moved unchanged (dcp->devequals bind'sdev, set at probe beforeplatform_set_drvdata()), leaving non-M4 DCP bind order identical.drivers/gpu/drm/apple/dcp.c:7622-7631: M4 callsdcp_read_notch(dcp)afterdcp_pin_live_session()and beforeiomfb_m4_start();iomfb_m4_start()does not readdcp->notch_rows(its boot framebuffer check usesdcp_m4_pf->notch_rows).dcp-internal.h:1497-1501:dcp_notch_dynamic()is true on M4, sonotch_heightstays 0 and static legacy geometry is untouched;MAX_NOTCH_HEIGHT(160) matchesDCP_M4_MAX_DST_Y(160).- External/desktop M4s:
apple,t8132-dcpextis adopted in probe and never reachesdcp_comp_bind_pipe(); nodes withoutapple,notch-heightkeepnotch_rows = 0and all consumers gate onnotch_rows. - Unbind (
dcp.c:8128onmain):apple_panel_notch_publish(0, 0)already runs before the M4 early return; rebind is refused byquiescingbefore the read. - Current
main(6ee70d49c228): merges cleanly without fuzz. - Hosted CI at
f7e22b4ff26a:Apple build and KUnitpass,Host testspass,pr-textpass. - Non-blocking note: the bot set
blast:nonewhile the PR body names J713, J715, and J604; adjusting theRisk:line wording would make the label match.
|
J713 no-regression row at exact head A = saved
On this 27.2 J713 the notch boots shown on both kernels: the boot-time state follows the loader's policy, unchanged by this PR. The one failed unit on B is |
There was a problem hiding this comment.
Verdict: MERGE at f7e22b4
Checked: The M4 bind now reads apple,notch-height after pinning the live session and before starting IOMFB. The helper clamps the row count and feeds the existing boot and runtime notch policy. The pre-existing bind path calls the same helper at its original position. I accept extending the notch-free boot default to panels on the M4 firmware 26.6.2 path that declare the property. Exact-head Apple DRM host tests and display KUnit passed.
The published J713 exact-head control uses firmware 27.2. The 26.6.2 feature result comes from the author's earlier combined build. #3926 (comment)
What: On an M4 DCP with firmware 26.6.2 the bind returns before
apple,notch-heightis read, sonotch_rowsstays 0 there and #2814's notch-free geometry is never offered. Read the notch rows beforeiomfb_m4_start().Replaces #3263, which was stacked on #2814 and closed automatically when #2814 merged and its branch was deleted (no review on it). Same commit, now on
main: it applies without change. #2814 alone still never reads the notch on M4 firmware 26.6.2 (the J713 row on #2814 used firmware 27.2, which takes another path).Tested: J713 (13-inch M4 MacBook Air, firmware 26.6.2), 2026-11-26: PASS. Boot logs a 64-row notch (hidden); the panel offers 2560x1600 and debugfs shows
scanout_y64; writing/sys/class/drm/card1-eDP-1/notchoffers 2560x1664 at once. Hyprland 0.57.2 picks up the new mode only after a restart (compositor side). The kernel (7.3.0-0.next2) was mainba29027e1580merged with #2814 and our other open branches, not this branch alone. Thedcp.cchange is the same as in the kernel booted; main has not touched the lines around it since. Regression on that kernel: 0 failed units, no oops, crash or stall, 10/10 deep sleeps with the notch hidden, panel back each time, no kernel errors.Risk: one-way by the "default users see" rule (a plain revert restores the old behaviour): on M4 panels with firmware 26.6.2 the default becomes the notch-free mode unless the boot loader says
asahi,show-notch, as #2814 intends for every notched panel.Other Macs: the call added is inside the M4 branch of the bind; for every other DCP the same code runs at the same place, moved into
dcp_read_notch(). The M4 panels with a notch are J713, J715 and J604 (the loader writesapple,notch-height); the iMac and Mac mini have none. On those three, with firmware 26.6.2, the notch can now be hidden and switched at run time, as on the other notched Macs with #2814.Not yet: DPMS within a few seconds of a switch, a deep sleep in the shown state, the idle cache in the hidden state, a VT switch; J715 and J604.
Details
dcp_read_notch()is #2814's own block, moved unchanged into a function so the M4 bind can call it too. The rest of the M4 path already works fromnotch_rows: theget_modestwins,dcp_notch_mode_known(),dcp_m4_notch_y(), the destination row of the swap, the full-panel startup and idle-cache surfaces at row 0, and the frame checkheight + dst_y == panel.dcp_notch_dynamic()is true for the M4 compatible.#2814 removes the
show_notchmodule parameter, soappledrm show_notch=1on an existing command line is now ignored with a warning (seen on this J713).Evidence
J713 test runs of 2026-11-25 and 2026-11-26 on 7.3.0-0.next2:
Host, on #2814 + this: apple-dcp host suite 97/97;
dcp.oW=1 clean; checkpatch--strictclean.