Skip to content

drm/apple: m4: read the notch rows of the M4 panel too (stacked on #2814) - #3263

Closed
themartiano wants to merge 1 commit into
aurora-silicon:notch-dyn/runtime-notchfrom
themartiano:fix/m4-notch-read
Closed

themartiano wants to merge 1 commit into
aurora-silicon:notch-dyn/runtime-notchfrom
themartiano:fix/m4-notch-read

Conversation

@themartiano

Copy link
Copy Markdown
Contributor

What: On an M4 DCP with firmware 26.6.2 the bind returns before apple,notch-height is read, so notch_rows stays 0 there and #2814's notch-free geometry is never offered. Read the notch rows before iomfb_m4_start().
Stacked on #2814 (Ryan Murray, base notch-dyn/runtime-notch at a776902f1350): this PR shows only the one commit on top. #2814 alone never reads the notch on M4 firmware 26.6.2; with this commit it does. To be retargeted to main when #2814 merges.
Tested: J713 (13-inch M4 MacBook Air, firmware 26.6.2) at 1f223f6c3bff, 2026-11-26: PASS. Boot logs a 64-row notch (hidden); the panel offers 2560x1600 and debugfs shows scanout_y 64; writing /sys/class/drm/card1-eDP-1/notch offers 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 main ba29027e1580 merged with all our M4 display and other branches and #2814, #2797, #2807, #2672, not this branch alone. This commit's tree is identical to the one booted (ebf21eafde9e; only the Signed-off-by was added). 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 (no SELinux on this image). Host: apple-dcp host suite 97/97 on #2814 plus this; W=1 build of dcp.o.
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 writes apple,notch-height); the iMac and Mac mini have none. On those three 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. Read in #2814 at a776902f1350, the rest of the M4 path already works from notch_rows: the get_modes twins, 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 check height + dst_y == panel. dcp_notch_dynamic() is true for the M4 compatible.

#2814 removes the show_notch module parameter, so appledrm show_notch=1 on 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:

kernel   apple-dcp 30ae00000.dcp: Detected display with notch of 64 pixel (hidden)
panel    connected, modes 2560x1600; debugfs scanout_y 64
sysfs    card1-eDP-1/notch switched: 2560x1664 offered at once
sleep    10/10 deep: entry deep, exit seen, connectors same as before, no kernel errors, no new failed units

Host, at the old head ebf21eafde9e (same tree): apple-dcp host suite 97/97 on #2814 + this; dcp.o W=1 clean; checkpatch --strict only asked for the Signed-off-by (now added).

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>
@RyanTheTide
RyanTheTide deleted the branch aurora-silicon:notch-dyn/runtime-notch November 29, 2026 00:05
@themartiano

Copy link
Copy Markdown
Contributor Author

Continued on main as #3926 (same commit; this PR closed when #2814's branch was deleted).

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