Repository navigation
drm/apple: m4: read the notch rows of the M4 panel too (stacked on #2814) - #3263
Closed
themartiano wants to merge 1 commit into
Closed
themartiano wants to merge 1 commit into
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>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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().Stacked on #2814 (Ryan Murray, base
notch-dyn/runtime-notchata776902f1350): 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 tomainwhen #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 showsscanout_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 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 ofdcp.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 intodcp_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 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 ata776902f1350, 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, at the old head
ebf21eafde9e(same tree): apple-dcp host suite 97/97 on #2814 + this;dcp.oW=1 clean; checkpatch--strictonly asked for the Signed-off-by (now added).