Skip to content

drm/apple: Hold panel presents while its display controller is off - #424

Closed
Jvaxx wants to merge 1 commit into
aurora-silicon:j514s/sleep-20261022from
Jvaxx:j514s/sleep-panel-hold
Closed

Jvaxx wants to merge 1 commit into
aurora-silicon:j514s/sleep-20261022from
Jvaxx:j514s/sleep-panel-hold

Conversation

@Jvaxx

@Jvaxx Jvaxx commented Oct 24, 2026

Copy link
Copy Markdown

This fixes a lid-close resume failure I hit with #380 on a J514S (14" M3 Pro, os-fw 14.7) with the default panel_hw_off=Y. It is stacked on #380 as a single commit, so you can squash it into that branch or rework it however you prefer.

Unpatched #380: the first lid-close resume left the panel dark and the DCP marked as crashed, and only a reboot recovered it. With panel_hw_off=N it was fine.

apple-dcp 28ec00000.dcp: display updates still pending at suspend
apple-dcp 28ec00000.dcp: display controller on failed: -110
apple-dcp 28ec00000.dcp: IOMFB transaction timed out: cmd=0 oob=0 present=1 accepted=1 swap=1307

A present admitted after the A472 off (swap 1307) reaches the stopped controller, which accepts it but never completes it. That blocks the IOMFB queue, so the A472 on at resume times out behind it and the queue timeout marks the DCP crashed. The commit holds the panel's presents from just before the A472 off until an A472 on succeeds. The commit message has the details.

Tested with the fix (Y, on #358 79d6375f, m1n1 97820568, Mesa #23, Hyprland 0.56; the tested module also carried a local logging-only patch):

  • 6 clean resumes after closing the lid from the desktop, on 3 boots (the longest sleep was 9.7 h).
  • 2 lid closes with the controller already off after a DPMS off: each time the hold refused 3 brightness presents, and the resume was clean.
  • s2idle from energy_now, one ~1 h run each: J514S (MacBook Pro M3 Pro): bring-up, DCP displays and G15 GPU #358 2.01 W, M3 Pro 1.4W sleep #380 N 1.62 W, Y + fix 0.54 W. The N → Y step (≈ 1.08 W) matches your 1.09 W. One overnight run came out at 1.07 W, which I can't explain yet.

Not verified:

  • The exact failing case (a present after the sleep-time A472 off) hasn't come back since the fix, and I don't know which producer queued it.
  • The new KUnit suite apple-dcp-panel-hold has only been compiled, not run.

I'm happy to share the logs or a diagnostics patch, or to test changes.

A472 with the hardware-power selector stops the J514S panel's display
controller.  The controller still accepts a present while it is off,
but it never completes it.  Nothing kept presents away from it: the
A472 off is queued after the blank drains, and any present admitted
later went out to the stopped controller.

Lid-close sleep did that.  The DRM suspend helper blanks the panel and
turns the controller off, and a present admitted after it (swap 1307
in the captured log) was accepted and then held the IOMFB queue.  The
sleep drain reported "display updates still pending at suspend", the
mailbox hold could not settle, and at resume the A472 on queued behind
the present: "display controller on failed: -110".  Ten seconds of
running time after the present started, the queue timeout declared the
coprocessor crashed, and every later atomic commit failed with EINVAL.
The panel stayed dark until a reboot.  DPMS off never showed it, as
nothing presents after a compositor's DPMS off.

Hold the panel's presents from just before the A472 off is queued until
the A472 on succeeds.  A present admitted earlier keeps its place ahead
of the A472 off and goes out to a running controller.  Admission
refuses a held present as it refuses a paused one: an atomic commit
completes with a synthetic vblank, and a brightness level stays pending
for the backlight restore that follows the A472 on.  The hold is
separate from the presentation pause, which the mailbox hold for system
sleep releases at resume, before DRM resume turns the controller back
on.  A failed A472 on keeps the hold, and the next power-on tries
again.

The sleep drain no longer waits for a backlight level that a panel
whose controller is off cannot take; the restore presents it.

Add KUnit cases for the admission, the order around the A472 off, and
the hold outlasting the presentation pause.

Signed-off-by: Jvaxx <82868042+Jvaxx@users.noreply.github.com>
@erykwieliczko

Copy link
Copy Markdown
Member

Fixed in omacom/linux-aurora#274

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