Skip to content

drm/apple: control the panel notch at run time - #2814

Open
RyanTheTide wants to merge 3 commits into
integration/aurorafrom
notch-dyn/runtime-notch
Open

RyanTheTide wants to merge 3 commits into
integration/aurorafrom
notch-dyn/runtime-notch

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

On a MacBook with a notch, the driver picked the panel geometry once, at probe. The notch rows were either hidden for the whole boot or shown for the whole boot (boot loader chosen/asahi,show-notch). Changing it needed a reboot. When the notch was shown, the text console drew its top lines under the notch: on a text-only system, or after Ctrl+Alt+F3.

Change

  • Both geometries are modes. Each panel timing is listed as the full panel and as a notch-free twin. The twin is the exact mode the old "hidden" setting produced: the notch rows are folded into vertical sync, with the same clock and totals. The mode a commit uses decides where the frame is scanned out. The twin is placed below the notch and those rows stay black. Switching between the two keeps the panel's timing, so it is a fast switch: no CRTC off/on and no firmware mode set.
  • Runtime control. Panels with notch rows get a new connector property, notch (enum hidden / shown), which a compositor can set atomically. The same switch is available as /sys/class/drm/cardN-eDP-1/notch for scripts. It chooses which geometry compositors are offered, and a change sends a hotplug event so they follow. The default is the boot loader's choice.
  • Console awareness. When no DRM master owns the device (multi-user.target, a switch to a text VT, a compositor that drops master or exits), only the notch-free geometry is offered. The console probes again into it, and its surface is sized to it, so it never draws under the notch. When the compositor takes the display back, it gets its own mode back as a fast switch.
  • M4 (T8132) pipe. This pipe only accepted full-panel frames. It now gets the same two modes, and a notch-free frame is placed with the swap's destination rectangle.
  • Selection by hardware description only. The rows come from apple,notch-height, which the boot loader takes from the ADT. There is no board list and no command-line or module parameter to set. Panels without notch rows (Neo, external displays) are unchanged. The standalone firmware 14.7 / 26.6 pipes build their single mode from the boot framebuffer, so they keep the boot loader's geometry for the boot.
  • A read-only debugfs file, dri/N/eDP-1/notch, reports rows, policy, whether a master owns the device, and the row offset of the last frame.

For compositors

Nothing new is needed. A compositor is offered the geometry the policy asks for, and follows a change through the usual hotplug re-probe. GNOME does this unmodified (rows below). A compositor that wants to decide for itself can set notch in the same atomic commit as the matching mode. Both modes are always accepted in a commit.

Testing

  • Host: the apple-dcp selftests, all groups (94/94), with two new cases. panel-notch-geometry runs the production parser and catalogue code on the J615 panel timing: the twin is bit-identical to the old hidden mode, and the offer, offset and ownership rules hold. A mutation that breaks the console rule fails it. m4-notch-frame checks the swap destination (y 64, height 1600) on the J713 profile. W=1 arm64 build clean, checkpatch clean.
  • J615 (M3 Air 15", firmware 27.2) and J713 (M4 Air 13", firmware 27.2): each ran its current default kernel plus this commit as a one-shot. Both were tested on the default Stage 2 (notch hidden), with a show-notch Stage 2 one-shot, and with a text-only boot. GNOME moves between full height and notch-free on the switch. A text VT and a text-only boot show the console below the notch. Going back to GNOME restores full height. The firmware mode-set count stays at its boot value throughout. Kernel error lines match the production boot. 0 AVC, 0 failed units. Both Macs were restored to production.

Still to run

  • J616s (M4 Pro, desktop 26.6 firmware) regression row, plus M2 / M1 Pro rows, on fleet78 + this commit (kernel building).
  • A visual check on the panel of the whole boot sequence with the boot loader's show-notch default (boot logo position from Stage 2 through Plymouth to GNOME).
Hardware rows in detail

Evidence: traces/display/20261122-notch-dyn/ (lab store). Snapshots record the eDP mode list, sysfs and debugfs notch state, CRTC mode, VT/fbcon, the count of set_digital_out_mode calls this boot, and kernel errors, AVCs and failed units.

J615, kernel 7.3.0-aurora-g15nd1 = J615 default source + this commit (pre-rebase; differs only by the base and two whitespace fixes)

step eDP modes offered CRTC mode scanout_y DRM master fw mode sets
boot, default Stage 2 (hidden) 2880x1800 2880x1800 64 yes 1
echo shown 2880x1864 2880x1864 0 yes 1
chvt 3 2880x1800 2880x1800 (fbcon 360x112) 64 no 1
chvt 2 2880x1864 2880x1864 0 yes 1
echo hidden / shown follows follows 64 / 0 yes 1
VT3: modetest -a -w 49:notch:0, back to GNOME 2880x1800 2880x1800 64 yes 1
boot with show-notch Stage 2 2880x1864 2880x1864 0 yes 1
same, multi-user.target 2880x1800 2880x1800 (fbcon 360x112) 64 no 1

J713, kernel 7.3.0-aurora-f80cnd1+ = J713 default source (fleet80c) + this commit; same steps, 2560x1664 full / 2560x1600 notch-free, fbcon 320x100, 3 firmware mode sets per boot throughout.

Kernel error lines on every test boot are the production boot's own set: Bluetooth codec capabilities and AFK ep20 init props on the J615; AFK ep20, DFB layout, DCPDP13Service admission on the J713.

Design notes for reviewers
  • The catalogue keeps both twins (notch_free marks the twin; twins are appended after the firmware's timings). dcp_nr_timings() keeps the "single fixed timing" decisions (firmware 27 boot-mode inheritance, desktop 26.x fixed panel) counting firmware timings. The panel EDID is built from the timings only.
  • Offer rule (dcp_notch_offer()): the effective geometry only. Effective = policy while a master owns the device, else notch-free. A probe whose height limit is below the panel (the console's fbdev re-probe, bounded by its surface) is also offered the notch-free modes, so the console's stored mode set never loses the panel while a compositor holds full height. The connector's fill_modes records that limit.
  • Fast switch: apple_connector_notch_fastset() clears mode_changed in the connector check, before the colour/EOTF logic below it can ask for a real mode set, only when the CRTC stays on, VRR is unchanged, and the new mode is the twin of the old one and in the catalogue.
  • Console: master_set / master_drop record ownership. On drop, a work item runs drm_client_dev_hotplug() (master_drop holds master_mutex, which the console restore takes). apple_drm_fbdev_probe() sizes the console surface notch-free if its first probe ever ran while a boot splash held master.
  • The notch property lives in a connector state subclass. The sysfs write commits it like a compositor would, and the commit tail updates the policy and schedules the hotplug.
  • The existing show_notch module parameter is kept for compatibility (it now only sets the starting policy). Nothing needs it.

Assisted-by: LLM (Claude:Opus 5.5)

A panel with a camera housing has apple,notch-height rows at its top.
Until now the driver read them once at probe: hidden for the whole boot
unless the boot loader kept them (chosen asahi,show-notch) or a module
parameter said otherwise, with no way to change it without a reboot, and
the text console drew under the notch whenever the notch was shown.

The panel always runs its native timing; what changes is how much of it
is drawn on.  Keep both geometries of each panel timing in the mode
catalogue: the full panel and its notch-free twin, with the notch rows
folded into the vertical sync exactly as the boot-time hidden mode did.
The mode a commit carries decides where the frame is scanned out (the
twin starts below the notch rows, which stay black), and switching
between the twins keeps the panel's mode, so it is no mode set.

Which geometry is offered follows a policy: the boot loader's choice,
then the new "notch" connector property (enum: hidden, shown), which a
compositor sets atomically, or /sys/class/drm/cardN-eDP-1/notch for
scripts.  A change re-probes userspace and the console.  The notch-free
modes are always offered; the full ones only while they are wanted and a
DRM master owns the device.  When no master does (a text-only system, a
VT switch, a compositor that dropped master or exited), the console gets
the notch-free geometry and re-probes into it; its surface is sized to
it, so it never draws under the notch.  A master that comes back gets
its own mode again, as a fast switch.

The M4 (T8132) pipe, which only took full-panel frames, gets the same
two modes: a notch-free frame is placed with the swap's destination
rectangle.  The standalone firmware 14.7/26.6 pipes keep the boot
loader's geometry for the boot.

Nothing is selected by board: the rows come from apple,notch-height,
which the boot loader takes from the ADT, and a panel without them is
unchanged.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>

@DjDeveloperr DjDeveloperr 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.

Pre-PR Checklist Review (§1–§6) — 0cb64c16fa63f3ffb439c4f1e9689092c9a1d55c

The overall design (twin modes in the catalogue, dcp_notch_offset scanout placement, atomic "notch" property, fastset between twin geometries) is clean and hardware-driven (§1, §3, §4, §6 pass), but there are several concrete blockers in the M4 (DCP_FIRMWARE_M4) path, teardown ordering, formatting, and §5 hardware coverage that need fixing before merge.

Blockers

  1. M4 (DCP_FIRMWARE_M4 / iomfb_is_m4()) rejects notch-free modes in 3 un-updated iomfb.c sites (§2):
    PR #2814 updated dcp_crtc_atomic_check() (dcp.c:2025) to call dcp_notch_mode_known(), but missed three remaining iomfb_is_m4(dcp) mode checks in drivers/gpu/drm/apple/iomfb.c that still require drm_mode_equal(mode, &fixed):

    • dcp_mode_valid() (iomfb.c:3645-3650): drm_helper_probe_single_connector_modes() calls mode_valid() on every mode added by dcp_get_modes() and prunes anything returning MODE_BAD. On an M4 DCP_FIRMWARE_M4 (26.6.2) boot with notch hidden, dcp_get_modes() offers only the notch-free mode and dcp_mode_valid() immediately prunes it, leaving zero modes on the panel.
    • dcp_crtc_atomic_modeset() (iomfb.c:3675-3683): rejects any real modeset to a notch-free mode with -EINVAL.
    • dcp_crtc_mode_fixup() (iomfb.c:3854-3858): rejects any non-fastset modeset (initial enable, DPMS wake, suspend/resume) to a notch-free mode with -EINVAL.

    (This escaped the J713 test because J713 ran firmware 27.2, where iomfb_is_m4() is false.) All three sites should use dcp_notch_mode_known(dcp, ...).

  2. M4 atomic_check vs dcp_flush() dst_y mismatch (§2):

    • iomfb_m4_plane_frame() (iomfb_m4_present.h:37-41) computes dst_y = height < DCP_M4_PANEL_HEIGHT ? DCP_M4_PANEL_HEIGHT - height : 0 without checking dcp->notch_rows, whereas dcp_flush() (iomfb.c:4452-4454) computes dcp_notch_offset(&new->mode, READ_ONCE(dcp->notch_panel_rows), dcp->notch_rows).
    • On M4, dcp->notch_panel_rows is only populated inside dcp_get_modes() (iomfb.c:2810). If a commit runs before dcp_get_modes() (e.g. retained modeset or restoring a cached mode), atomic_check succeeds while dcp_flush() computes dst_y = 0 and fails mid-commit in iomfb_m4_present_at() -> dcp_m4_frame_check() (-EINVAL -> dcp_drm_crtc_error(-EIO)). Populate notch_panel_rows when the M4 panel mode is established (or compute consistently from iomfb_m4_get_mode()).
  3. Teardown UAF / workqueue re-arm race in apple_drm_uninit() (apple_drv.c:2278-2285) (§2):

    • cancel_work_sync(&apple->notch_hotplug) and cancel_work_sync(&apple->notch_console) are placed before drm_dev_unplug(&apple->drm) and drm_atomic_helper_shutdown(&apple->drm).
    • Until drm_dev_unplug() unregisters sysfs and closes off DRM ioctls, notch_store(), an atomic commit, or apple_drm_master_drop() can re-queue either work item after cancel_work_sync() returns, allowing drm_kms_helper_hotplug_event() / drm_client_dev_hotplug() to run after component_unbind_all() / dcp_unlink().
    • Move both cancel_work_sync() calls after drm_dev_unplug() and drm_atomic_helper_shutdown(), and guard notch_store() with drm_dev_enter()/drm_dev_exit().
  4. Accidental deleted newline in drivers/gpu/drm/apple/parser.h:237:

    /* Caller serializes readers against replacement. */int replace_modes(struct dcp_parse_ctx *handle,

    Please restore the newline between the comment and prototype.

  5. §5 Evidence incomplete (acknowledged in PR "Still to run"):

    • Only J615 (pre-rebase, fw 27.2) and J713 (fw 27.2) have been tested so far.
    • Missing hardware verification on: J616s (desktop 26.6), M1 Pro / M2 (older DCP fw), M4 26.6.2 (DCP_FIRMWARE_M4 path, which has blocker #1 above), a non-notch panel regression (e.g. MacBook Neo / external-only display), and the visual boot-logo check with show-notch Stage 2.

Non-blocking / ABI & Correctness Notes

  • Commit message vs dcp_notch_offer(): The commit message says "The notch-free modes are always offered; the full ones only while they are wanted and a DRM master owns the device", but dcp_notch_offer() actually hides notch-free modes whenever effective == DCP_NOTCH_SHOWN && full_fits (only one geometry is offered at a time, as the PR body's Design notes describe). Please align the commit message.
  • Sysfs ABI documentation: The new writable /sys/class/drm/cardN-eDP-1/notch sysfs attribute should be documented under Documentation/ABI/testing/.
  • fbdev initial-probe / master_drop() race: If a boot splash holds DRM master during apple_drm_fbdev_probe(), drm_client_modeset_probe() has already selected the full-panel mode before apple_drm_fbdev_probe() shrinks sizes->surface_height by notch_rows, leaving the cached modeset mode taller than the fbdev surface until the async notch_console work runs; on master_drop(), drm_client_dev_restore() can race ahead of schedule_work(&apple->notch_console).
  • Fastset adjusted_mode: Clearing new_cs->mode_changed = false in apple_connector_notch_fastset() skips mode_fixup() in drm_atomic_helper_check_modeset(), leaving crtc_state->adjusted_mode.vdisplay at the previous geometry (currently harmless since drm/apple uses crtc_state->mode and clock/totals match, but worth copying or noting explicitly).

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Review at 0cb64c1.

  1. The T8132 pipe still treats the notch-free twin as invalid in three places this PR doesn't touch. dcp_mode_valid() returns MODE_BAD unless drm_mode_equal(mode, &fixed) (iomfb.c:3645-3649), so the probe helper drops the 2560x1600 twin that dcp_get_modes() adds. With the default hidden policy, the full mode isn't offered either (iomfb.c get_modes M4 branch), so the eDP connector ends up with no valid mode. dcp_crtc_mode_fixup() (iomfb.c:3853-3857) and dcp_crtc_atomic_modeset() (iomfb.c:3675-3683) also require the full mode, so any real modeset of the twin fails: the first enable, DPMS off/on, and resume (apple_drm_drop_stale_crtcs() resumes that CRTC disabled). Only dcp_crtc_atomic_check() was changed to dcp_notch_mode_known(). All four checks should use it. The J713 row ("fbcon 320x100") can't come from this head. Please re-run it on the PR head.
  2. Default-boot regression on the dynamic pipes: notch_height is now 0 there, so dcp_panel_read_dimensions() / dcp_panel_read_adt() (dcp.c:1246, 1291) report the full height-mm while the default mode is the notch-free one. Before, the hidden boot reported adj-height-mm. The twin needs its own height_mm (adj-height-mm), or the physical size should follow the mode offered.
  3. If notch rows are set but the catalogue has no twins (dcp_notch_free_mode() refuses a timing, or dcp_modes_adopt()), the hidden policy filters out every full mode (iomfb.c:3039). Fall back to offering the full timing when it has no twin.
  4. show_notch (dcp.c:376) is still 0644, but it is only read at bind now, so writing it at run time does nothing. Now that the policy comes from chosen/asahi,show-notch and can be changed at run time, please drop the parameter, or at least make it 0444.
  5. New uAPI: the notch connector property and /sys/class/drm/cardN-eDP-1/notch need a Documentation/ABI entry, plus a note in the DRM driver docs for the property.
  6. parser.h:237: the comment and int replace_modes( got joined on one line (whitespace damage).
  7. Rows at this head: J713 (all steps, plus s2idle resume and DPMS off/on with the notch hidden), J615 s2idle resume with each policy, J616s regression, and the other notched panels on the template path (M1 Pro/Max J314/J316, M2 Air J413, M2/M3 Pro MBP), which reach the new twin catalogue and fast switch.

Follow-up to "drm/apple: control the panel notch at run time":

- M4 (T8132, firmware 26.6.2) pipe: mode_valid(), mode_fixup() and the
  CRTC mode set still required the full panel mode, so the probe pruned
  the notch-free twin (no mode at all with the notch hidden) and a real
  mode set of it failed.  Accept the panel timing in either geometry
  everywhere, and place a frame from the timing the firmware reports
  rather than from a value get_modes() caches.
- Teardown: cancel the notch work items after drm_dev_unplug() and the
  shutdown commit, and run them, the sysfs write and the master-drop
  scheduling only while the device is plugged.
- A full timing that cannot have a twin is offered as it is under either
  policy, instead of being filtered out.
- The physical height reported follows the geometry offered: the
  notch-free modes and the connector take the panel's adj-height-mm, or
  the full height scaled by rows.
- The fast switch leaves the adjusted mode equal to the mode, as
  mode_fixup() would.
- Drop the show_notch module parameter, now only read at bind: the boot
  loader sets the starting choice and the "notch" property changes it.
- Document the property and the sysfs attribute
  (Documentation/gpu/apple-dcp-notch.rst,
  Documentation/ABI/testing/sysfs-class-drm-apple-notch).
- Fix the parser.h line the first commit joined.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Thanks to both reviews. Fixed in 0c29a3e (follow-up commit; the first commit is unchanged):

  1. M4 pipe checks. dcp_mode_valid(), dcp_crtc_mode_fixup() and the M4 branch of dcp_crtc_atomic_modeset() now use dcp_notch_mode_known(), like dcp_crtc_atomic_check(). The twin is no longer pruned, and a real mode set to it (first enable, DPMS, resume) is accepted.
  2. M4 dst_y. dcp_flush() computes the offset from the timing the firmware reports (iomfb_m4_get_mode() plus dcp_notch_twin_of()), the same thing iomfb_m4_plane_frame() checks against. It no longer depends on notch_panel_rows being cached by get_modes().
  3. Teardown. Both cancel_work_sync() calls now run after drm_dev_unplug() and drm_atomic_helper_shutdown(). notch_store() and both work functions run inside drm_dev_enter()/drm_dev_exit(), and master_drop() does not schedule once the device is unplugged.
  4. parser.h line. Restored.
  5. Physical size. The panel's adj-height-mm is always read. Notch-free modes get it (or the full height scaled by rows when the DT has none), and dcp_update_connector_dimensions() reports the height of the geometry currently offered to a compositor. The host j616s-panel-identity case caught a stale adj_height_mm on re-read, which is fixed too.
  6. Timing without a twin. Full modes are marked notch_twin when they get one. A timing without one is offered as it is under either policy.
  7. show_notch. Removed. The boot loader sets the starting choice and the property changes it. apple-drm-parameters.rst now points to the new doc.
  8. Docs. Added Documentation/gpu/apple-dcp-notch.rst (property, console rule, sysfs, debugfs) and Documentation/ABI/testing/sysfs-class-drm-apple-notch.
  9. Fast switch. It now copies mode into adjusted_mode when it clears mode_changed.
  10. Commit text. The follow-up commit message describes the offer rule as it is: one geometry at a time, plus notch-free for a probe bounded by the console surface.

On the earlier J713 row: on fleet80c with firmware 27.2, iomfb_is_m4() is false and the panel runs the template pipe (set_digital_out_mode and timing ids in its log, eDP 2560x1600 hidden by default). The rows exercised that pipe, not the M4 one. No lab Mac runs the M4 26.6.2 pipe at the moment. That pipe is covered by the m4-notch-frame host case and the checks above.

fbdev first-probe race: if a boot splash held master during the console's first probe, the surface is clamped notch-free and the stale full-height mode set is replaced at the next master drop. A restore that runs before that work item fails once (plane larger than the surface) and changes nothing on screen. It does not occur on a normal boot, where the first probe runs before any master.

Host: apple-dcp 94/94 at this head, W=1 clean. Rows at 0c29a3e to follow: J713 (all steps, plus a short s2idle and DPMS off/on with the notch hidden), J615 (s2idle in each policy), J616s regression, M1 Pro and M2.

@DjDeveloperr DjDeveloperr 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.

Pre-PR Checklist Re-Review (§1–§6) — 0c29a3e42b3d526f27219cbd9ca8414ed23b51f0

All three prior kernel blockers from the 0cb64c16 review (and the formatting/uAPI items) are resolved cleanly in 0c29a3e4:

  • M4 (DCP_FIRMWARE_M4 / 26.6.2) mode checks (resolved): dcp_mode_valid(), dcp_crtc_atomic_modeset(), and dcp_crtc_mode_fixup() in drivers/gpu/drm/apple/iomfb.c now all use dcp_notch_mode_known(), matching dcp_crtc_atomic_check().
  • M4 dst_y consistency (resolved): dcp_flush() now uses dcp_m4_notch_y(), deriving the scanout offset directly from iomfb_m4_get_mode() + dcp_notch_twin_of() so it matches iomfb_m4_plane_frame() even before dcp_get_modes() runs.
  • Teardown ordering (resolved): apple_drm_uninit() now cancels notch_hotplug and notch_console after drm_dev_unplug() and drm_atomic_helper_shutdown(), with drm_dev_enter()/drm_dev_exit() guards in notch_store() and both work items, plus !drm_dev_is_unplugged(drm) in apple_drm_notch_owner().
  • Other prior items (resolved): parser.h newline restored; show_notch module parameter dropped (pure default cmdline, §2); adj-height-mm / dcp_notch_free_mm() physical height wired up; notch_twin fallback preserves timings without twins; fastset copies mode to adjusted_mode; ABI & driver docs added (Documentation/ABI/testing/sysfs-class-drm-apple-notch, Documentation/gpu/apple-dcp-notch.rst).
  • §1, §2, §3, §4, §6: Pass (DT/ADT-driven with no model gating, human commits with human Signed-off-by and no AI commit trailers, host-tests CI green).

Remaining Blocker

  1. §5 Hardware evidence at 0c29a3e4 still pending:
    • No hardware runs have been posted for 0c29a3e4 yet (which changed dcp.c, iomfb.c, apple_drv.c, dcp-notch.h, and dropped show_notch).
    • As noted in the follow-up comment and PR body ("Still to run"), please post the 0c29a3e4 hardware rows before merge: J713 (full steps + s2idle + DPMS off/on with notch hidden), J615 (s2idle in each policy), J616s (desktop 26.6 regression), M1 Pro / M2 template-pipe regression, and the visual boot-logo check with show-notch Stage 2 (each with 0 SELinux denials, 0 failed units, 0 new kernel errors).

Non-blocking Notes

  • Teardown hardening (apple_drv.c:2307-2308): Switching cancel_work_sync(&apple->notch_hotplug) / cancel_work_sync(&apple->notch_console) to disable_work_sync() (matching apple_drm_quiesce_connectors()) would close the narrow window where an in-flight apple_drm_master_drop() (which does not hold drm_dev_enter()) or a nonblocking commit tail running apple_commit_notch() after drm_atomic_helper_commit_hw_done() re-queues work after cancel_work_sync().
  • Async dcp_set_dimensions() physical height (dcp.c:1509-1512): dcp_set_dimensions() writes full height_mm directly to connector->display_info.height_mm without applying dcp_notch_free_mm() when READ_ONCE(dcp->notch_free_offered) is true, so an async dimensions_wq run can overwrite the notch-free physical height until the next dcp_get_modes(). Also, caching READ_ONCE(dcp->notch_panel_rows) once in dcp_update_connector_dimensions() avoids reading it twice.

Assisted-by: LLM (Gemini 4 Neon)

- Disable rather than cancel the notch work items at teardown, as the
  connector work items are: a master drop or a commit tail still in
  flight cannot queue them again.
- dcp_set_dimensions() (the asynchronous DisplayAttributes update)
  reports the connector's size through dcp_update_connector_dimensions(),
  so it keeps the notch-free height while that geometry is offered.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Hardware rows at 4d7e97f. Each Mac ran fleet81 plus the three commits of this PR as a one-shot (driver diff identical to the PR), and each was restored to its default afterwards. Counts are 0 SELinux denials, 0 failed units, and no kernel error lines beyond the production boot's own.

Mac default geometry runtime toggle console when no master DPMS off/on 15 s s2idle
J713 (M4 Air, fw 27.2) hidden: 2560x1600 at row 64; with a show-notch Stage 2: 2560x1664 both ways, no firmware mode set VT3 and a multi-user.target boot: 2560x1600 at row 64 see below each policy, geometry kept on resume
M2 Air (template pipe) 2560x1664 (show-notch Stage 2) both ways VT3: 2560x1600 at row 64 each policy, geometry kept each policy, geometry kept
J616s (desktop 26.6, ProMotion) 3456x2234, all 6 timings 3456x2160 at row 74 (6 twins) and back VT3 runs kmscon (see below) each policy, geometry kept not run (below)
M1 Pro this unit has no internal panel connected (no eDP modes on production either) – – – –

Notes:

J615 rows at this head (with s2idle in each policy) follow when the Mac is free. The visual boot-logo check is still open.

@DjDeveloperr DjDeveloperr 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.

Pre-PR Checklist Re-Review (§1–§6) — 4d7e97f68d519724f28f7859940bd0430bde3b42

Verified live at 4d7e97f68d519724f28f7859940bd0430bde3b42 (all 3 commits 0cb64c16 -> 0c29a3e4 -> 4d7e97f6):

  • Delta at 4d7e97f6 (clean):
    • drivers/gpu/drm/apple/apple_drv.c: switched notch_hotplug and notch_console teardown in apple_drm_init() (err_unbind) and apple_drm_uninit() from cancel_work_sync() to disable_work_sync(), closing the re-arm window noted on 0c29a3e4.
    • drivers/gpu/drm/apple/dcp.c: dcp_set_dimensions() now calls dcp_update_connector_dimensions() so asynchronous DisplayAttributes updates preserve the notch-free physical height while that geometry is offered, and dcp_update_connector_dimensions() caches READ_ONCE(dcp->notch_panel_rows) once. (dcp_get_modes() recomputes mode->height_mm via dcp_notch_free_mm() when duplicating notch-free modes, so catalogue mode.height_mm stays consistent.)
    • tools/testing/selftests/drivers/gpu/apple-dcp/edid.py: reordered extracted helper definitions to match the new call from dcp_set_dimensions(); host-tests CI is green (1/1).
  • §5 Hardware evidence at 4d7e97f6 (posted):
    • Hardware runs on fleet81 + all 3 PR commits across three distinct notched Mac generations/pipes — J713 (M4 Air, fw 27.2: hidden/shown default, fast runtime toggle with 0 firmware modesets, VT3 & multi-user.target notch-free console, 15 s s2idle both policies), M2 Air (template pipe: toggle, VT3 console, DPMS off/on & 15 s s2idle both policies), and J616s (M4 Pro, desktop 26.6 ProMotion: 6 timings + 6 notch-free twins at row 74, toggle, DPMS off/on both policies) — all with 0 SELinux denials, 0 failed units, and 0 new kernel error lines.
  • §1, §2, §3, §4, §6: All pass. Pure DT/ADT-driven (apple,notch-height, no model gating), default kernel command line (no show_notch module param), clean human commit history (Signed-off-by: Ryan Murray <ryan@aurorasilicon.org> on all 3 commits, zero AI commit trailers).

Non-blocking Follow-ups

  • Please add the J615 4d7e97f6 s2idle row and the visual boot-logo check when the machine is free.
  • Minor PR body housekeeping: the PR description's Design Notes still mention show_notch being kept (removed in 0c29a3e4) and "Still to run" still lists J616s/M2 (now completed at 4d7e97f6).

Code, CI, and multi-generation §5 evidence at 4d7e97f6 are clean — approved and ready for MERGETRAIN-LINUX4.

Assisted-by: LLM (Gemini 4 Neon)

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