Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion drivers/gpu/drm/apple/iomfb_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,15 @@ void DCP_FW_NAME(iomfb_poweroff)(struct apple_dcp *dcp)
swap_id = cookie->swap_id;
kref_put(&cookie->refcount, release_swap_cookie);
if (ret <= 0) {
dcp->crashed = true;
/*
* An unplugged display leaves this swap unacknowledged. That
* is not a crash, and ->crashed rejects every later commit on
* this CRTC until reboot. Return rather than continuing the
* teardown: that path fails the dptx HPD deassert and the
* display never comes back.
*/
dev_warn(dcp->dev,
"poweroff: clear swap did not complete in 50 ms\n");
Comment on lines +939 to +947

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Silent wedges remain healthy

A clear-swap timeout can also occur when the DCP silently stops responding. RTKit only calls dcp_rtk_crashed() after an explicit crashlog message, so a silent wedge does not set dcp->crashed. This change treats every timeout as benign, allowing later atomic checks and readiness waits to keep sending work to unresponsive firmware instead of failing fast, which can cause repeated command timeouts. Only suppress the crash latch when the timeout can be attributed to a disconnected output.

Comment on lines +946 to +947

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Normal unplug emits warnings

This branch is described as an expected result of routinely unplugging an external display, but it emits an unconditional warning each time. That makes normal hot-unplug activity look like a driver fault and adds avoidable kernel-log noise. Use an informational or debug-level message, or rate-limit the diagnostic.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

return;
}

Expand Down