Re: [PATCH] drm/msm/dp: skip the link teardown after a failed enable

From: Burke Cates

Date: Fri Dec 04 2026 - 03:58:24 EST


On Wed, 2 Dec 2026 08:12:30 -0500, Liviu Nicoara wrote:
> When the external DP attach fails to enable ctrl_link (-16) during
> .atomic_enable() and the connector is then turned off, the unguarded
> msm_dp_ctrl_off_link() in msm_dp_display_unprepare() takes an EL1
> synchronous external abort and the machine resets seconds later:

Thanks for the report. That failure is in msm_dp_ctrl_on_link(), so
.atomic_enable() returns before power_on is set, and with the patch
msm_dp_display_unprepare() skips msm_dp_ctrl_off_link() in that case.
I expect it to cover your crash.

> From the disassembly of msm_dp_ctrl_off_link+0x4c, the faulting
> instruction (b9400020: ldr w0, [x1]) is the first REG_DP_MAINLINK_CTRL
> read inside msm_dp_ctrl_mainlink_disable(), before DP_SW_RESET is
> reached.

That answers the question my notes left open: the A16 resets without
a log, so I could not tell which access faults. The commit message
only mentions the write to REG_DP_MAINLINK_CTRL; if a v2 is wanted,
I will say there that the read already faults.

> I have not rebuilt with Burke's patch yet, so no Tested-by, just
> confirming the regression is live on mainline X1E80100.

A Tested-by would help if you find the time.

One update to my earlier reply: Gianfranco Mariotti's v3, posted on
2026-12-02, now covers this path too. Its 08/11 adds dp->prepared and
returns early from msm_dp_display_unprepare() when the link was never
prepared:
https://lore.kernel.org/all/20261202234640.9379-9-gianfranco.mariotti94@xxxxxxxxx/

That patch is part of an 11-patch series based on msm-next, and
sashiko-bot raised an open eDP PHY question on it, so for -rc I
think the small fix is the safer choice; 08/11 would then need a
trivial rebase. The patch still applies to current mainline and
drm-fixes.

An AI coding assistant helped check the trees and draft this reply.

Thanks,
Burke