Skip to content

drm/apple: v14.7: follow chosen.asahi,show-notch for the boot panel size - #3792

Merged
DjDeveloperr merged 1 commit into
mainfrom
fix/v14-boot-notch-kept
Dec 2, 2026
Merged

DjDeveloperr merged 1 commit into
mainfrom
fix/v14-boot-notch-kept

Conversation

@maralcbr

@maralcbr maralcbr commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Boot loaders that keep the notch rows (aura with show-notch=1) hand off the full panel framebuffer (e.g. 3024x1964 on 14" M3 Pro J514S) and set /chosen/asahi,show-notch = "1".

On v14.7 boards whose dcp_v14_boards[] entry omits panel_height (T6030 J514S / J516S), dcp_v14_geometry() unconditionally added the 74 notch rows to fb_height, deriving 3024x2038 instead of 3024x1964. The DCP firmware rejected that fabricated height with -EINVAL, leaving the internal display, backlight, and GPU unprobed.

Change

  • Export dcp_boot_show_notch(const struct device_node *chosen) in dcp-internal.h (preserving its signature for dcp_handoff_test.c).
  • Add a shared dcp_boot_panel_height(fb_height, notch, known_height, notch_kept) helper used by both dcp_v14_geometry() and dcp_v26_geometry().
  • Consult notch_kept only when known_height == 0 (unsized boards), keeping sized-board derivation in both v14.7 and v26.6 unchanged even under a contradictory /chosen flag.
  • Add the v14_boot_panel_height KUnit test covering hidden, kept, sized-board (including contradictory flag), and no-notch cases.
  • Update tools/asahi/dcp14-panel-tests.py to pull dcp_boot_panel_height() from dcp-internal.h, stub dcp_boot_show_notch(of_chosen), and test both the unsized kept-notch case and the sized contradictory-flag case.

Tested: J514S 14" M3 Pro (T6030, OS FW 14.7, aura 1.0.0b17 show-notch=1) at 7933a32 (identical kernel code; a342786 only adds the tools/asahi/dcp14-panel-tests.py host harness update and rebases onto main 3330657b1deb, MacLab j1202-001502-d4b3, booted in 24 s): T6030 display started: 3024x1964@120, 74 notch rows shown, 302x196 mm, apple-panel-bl active (140/500), 0 deferred devices, 0 DCP errors, G15S 18-core [9, 9] GPU OpenGL ES 3.2 render pixel-verified; python3 tools/asahi/dcp14-panel-tests.py PASS and host Clang check of all 10 v14_boot_panel_height assertions PASS (0 failures).

Risk: two-way · unsized v14.7 notched boards (T6030 J514S / J516S) when chosen.asahi,show-notch="1"; sized v14.7/v26.6 boards and hidden-notch boots keep identical behavior.

@maralcbr
maralcbr requested review from a team as code owners December 1, 2026 14:27
@maralcbr
maralcbr requested review from Acelogic and malik-na and a balanced review from Copilot December 1, 2026 14:27
@github-actions github-actions Bot added area:display Area from CODEOWNERS (bot) ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Merge readiness at a3427861: not ready yet

Check Detail
CI at head no failing: apple-build, host-tests, KUnit dcp-fabric dcp-topology dcp-display
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at a3427861
Conflicts ok none
PR text ok Risk: two-way · unsized v14.7 notched boards (T6030 J514S / J516S) when chosen.asahi,show-notch="1"; sized v14.7/v26.6 boards and hidden-notch boots keep identical behavior.

Areas: area:display, area:gpu

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block approval of the boot-panel sizing changes.

No open issues 🎉

What changed in this PR

Fixes Apple DCP boot-panel sizing when the bootloader keeps notch rows on boards without a recorded panel height. This prevents double-counting those rows and rejecting the resulting display geometry.

Changes:

  • Share panel-height calculation between the v14.7 and v26.6 paths, honoring chosen.asahi,show-notch only for unsized boards.
  • Make the existing boot-notch flag reader available to both paths while preserving sized-board behavior.
  • Add KUnit coverage for hidden, kept, contradictory-flag, and no-notch cases.
File Description
drivers/​gpu/​drm/​apple/​v14-board-test.c Adds ten panel-height assertions to the KUnit suite.
drivers/​gpu/​drm/​apple/​iomfb_v26_6.c Uses the shared panel-height helper for v26.6 geometry.
drivers/​gpu/​drm/​apple/​iomfb_v14_7.c Uses the shared helper to correct unsized-board boot geometry.
drivers/​gpu/​drm/​apple/​dcp.c Makes the existing boot-notch flag reader non-static.
drivers/​gpu/​drm/​apple/​dcp-internal.h Declares the flag reader and defines the shared height helper.

Review effort: Balanced

maralcbr added a commit to omacom/linux-aurora that referenced this pull request Dec 1, 2026
@github-actions github-actions Bot added blast:m3 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) and removed needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) labels Dec 1, 2026
Boot loaders that keep the notch rows (aura with show-notch=1) hand off
the full panel framebuffer (e.g. 3024x1964 on 14" M3 Pro J514S) and set
chosen.asahi,show-notch="1". On v14.7 boards whose table entry omits the
panel size (T6030 J514S / J516S), dcp_v14_geometry() unconditionally
added the 74 notch rows to fb_height, arriving at 3024x2038 instead of
3024x1964; the DCP firmware rejected the fabricated height with -EINVAL
and the internal display failed to probe.

Export dcp_boot_show_notch() and consult it via a shared
dcp_boot_panel_height() helper only when the board has no known panel
height (preserving existing sized-board behavior in both v14.7 and v26.6),
so unsized v14.7 boards keep fb_height when the boot loader kept the notch.

Tested on MacBook Pro 14" M3 Pro (J514S, T6030, OS FW 14.7, aura
show-notch=1): DCP probes cleanly at 3024x1964@120, backlight and G15S
GPU come up without errors.

Add a v14_boot_panel_height KUnit test covering hidden, kept, sized-board
(including contradictory chosen flag), and no-notch cases.

Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
@maralcbr
maralcbr force-pushed the fix/v14-boot-notch-kept branch from 7933a32 to a342786 Compare December 1, 2026 14:52
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) ci-failing A check failed at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Dec 1, 2026

@scottjones scottjones left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Marcelo, this is a clean fix for omacom/omarchy#20833.

I walked it against every v14 record. Boards with a panel size (J613, J615, J504, J516C/J516M) and all the v26 boards come out exactly as before. The unsized T6030 boards (J514S/J516S) now get 1964 when the notch rows are kept and the flag is "1", which is the fix, and still get 1964 with hidden rows and flag "0". That holds for aura b13 through b17 and for an owner who sets show-notch=0.

The red checks at head (apple-build, host-tests, KUnit) are the Ubuntu apt mirror timing out in the dependency install step, so they just need a rerun. pr-text passes at head, and the driver diff at 7933a32 (your Tested run) is byte-identical to head.

One nit, not a blocker. With hidden notch rows but the flag set to "1" on a board with no panel size, dcp_boot_panel_height() now returns 1890 and the probe fails with -EINVAL, where the old code gave 1964. That comes from the !known_height && notch_kept branch in dcp-internal.h. Nothing produces it today, since aura only sets the flag when it keeps the rows, but a future loader or something that rewrites /chosen could. Could you add a KUnit case for (fb 1890, notch 74, flag 1) so that behavior is pinned down either way?

Optional hardening for later: pick the native timing whose height is fb_height or fb_height + notch (preferring the exact framebuffer match), so the geometry doesn't depend on the flag at all. I have a branch with that if you want it.

Approving.

maralcbr added a commit to omacom/linux-aurora that referenced this pull request Dec 2, 2026
@DjDeveloperr
DjDeveloperr merged commit bbded5b into main Dec 2, 2026
17 of 21 checks passed
@DjDeveloperr
DjDeveloperr deleted the fix/v14-boot-notch-kept branch December 2, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:display Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants