Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Abort DPMS ON when enabling the link fails
@ 2026-10-28 20:26 Abdulla Bubshait
  2026-11-15  7:35 ` Wayne Lin
  0 siblings, 1 reply; 2+ messages in thread
From: Abdulla Bubshait @ 2026-10-28 20:26 UTC (permalink / raw)
  To: amd-gfx
  Cc: harry.wentland, sunpeng.li, siqueira, alexander.deucher,
	dominik.kaszewski, dri-devel, Abdulla Bubshait, stable

Since commit 843049bac7c0 ("drm/amd/display: Split DPMS ON into
parts"), link_set_dpms_on_enable_link() returns
DC_DPMS_FAILED_HANDSHAKE when enable_link() fails and the stream
enable has to be aborted: any failure other than link training, or a
link training failure on DP MST. The link has already been disabled at
that point. The step loop in link_set_dpms_on() treats
DC_DPMS_FAILED_HANDSHAKE like DC_DPMS_SUCCESS and goes on to
link_set_dpms_on_post_enable_link().

Before the split, this path returned right after disable_link(),
because MST displays can't proceed without link training. Now, for
failed MST handshakes MST slots are still allocated.  When the link
trains again later, the new payload starts after the leaked slots so
ACT never completes, and the display stays black until
reboot. Replugging or power-cycling the monitor does not recover it.

Seen on Navi 33 (DCN 3.2.1) with a DP 2.1 MST monitor (Odyssey Neo G9)
at UHBR10 x4 with DSC. Link training sometimes fails on DPMS
wake. With this change, the failed attempt leaves no payload behind,
and the next modeset after the sink reconnects bring the monito back
up.

Return early on DC_DPMS_FAILED_HANDSHAKE, as for
DC_DPMS_SKIPPED_HANDSHAKE. This restores the pre-split behaviour. Link
training failures on non-MST signals still return DC_DPMS_SUCCESS and
continue as before.

Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/6047
Fixes: 843049bac7c0 ("drm/amd/display: Split DPMS ON into parts")
Cc: stable@vger.kernel.org # 7.3
Signed-off-by: Abdulla Bubshait <darkstego@gmail.com>
---
 drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
index 75e232ebffe8..b355e29b178d 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
@@ -2813,11 +2813,11 @@ enum dc_status link_set_dpms_on(
 
 		switch (step_result) {
 		case DC_DPMS_SUCCESS:
-		case DC_DPMS_FAILED_HANDSHAKE:
 			// Enum is ordered from "best" to "worst" results
 			result = max(result, step_result);
 			break;
 
+		case DC_DPMS_FAILED_HANDSHAKE:
 		case DC_DPMS_SKIPPED_HANDSHAKE:
 			return step_result;
 
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amd/display: Abort DPMS ON when enabling the link fails
  2026-10-28 20:26 [PATCH] drm/amd/display: Abort DPMS ON when enabling the link fails Abdulla Bubshait
@ 2026-11-15  7:35 ` Wayne Lin
  0 siblings, 0 replies; 2+ messages in thread
From: Wayne Lin @ 2026-11-15  7:35 UTC (permalink / raw)
  To: amd-gfx
  Cc: Abdulla Bubshait, Harry Wentland, Leo Li, Rodrigo Siqueira,
	Alex Deucher, dominik.kaszewski, dri-devel, stable

Reviewed-by: Wayne Lin <Wayne.Lin@amd.com>

On Wed, 28 Oct 2026 16:26:41 -0400, Abdulla Bubshait wrote:
> Since commit 843049bac7c0 ("drm/amd/display: Split DPMS ON into
> parts"), link_set_dpms_on_enable_link() returns
> DC_DPMS_FAILED_HANDSHAKE when enable_link() fails and the stream
> enable has to be aborted: any failure other than link training, or a
> link training failure on DP MST. The link has already been disabled at
> that point. The step loop in link_set_dpms_on() treats
> DC_DPMS_FAILED_HANDSHAKE like DC_DPMS_SUCCESS and goes on to
> link_set_dpms_on_post_enable_link().
>
> Before the split, this path returned right after disable_link(),
> because MST displays can't proceed without link training. Now, for
> failed MST handshakes MST slots are still allocated.  When the link
> trains again later, the new payload starts after the leaked slots so
> ACT never completes, and the display stays black until
> reboot. Replugging or power-cycling the monitor does not recover it.
>
> Seen on Navi 33 (DCN 3.2.1) with a DP 2.1 MST monitor (Odyssey Neo G9)
> at UHBR10 x4 with DSC. Link training sometimes fails on DPMS
> wake. With this change, the failed attempt leaves no payload behind,
> and the next modeset after the sink reconnects bring the monito back
> up.
>
> Return early on DC_DPMS_FAILED_HANDSHAKE, as for
> DC_DPMS_SKIPPED_HANDSHAKE. This restores the pre-split behaviour. Link
> training failures on non-MST signals still return DC_DPMS_SUCCESS and
> continue as before.
>
> Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/6047
> Fixes: 843049bac7c0 ("drm/amd/display: Split DPMS ON into parts")
> Cc: stable@vger.kernel.org # 7.3
> Signed-off-by: Abdulla Bubshait <darkstego@gmail.com>
> ---
>  drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
> index 75e232ebffe8..b355e29b178d 100644
> --- a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
> +++ b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
> @@ -2813,11 +2813,11 @@ enum dc_status link_set_dpms_on(
>  
>  		switch (step_result) {
>  		case DC_DPMS_SUCCESS:
> -		case DC_DPMS_FAILED_HANDSHAKE:
>  			// Enum is ordered from "best" to "worst" results
>  			result = max(result, step_result);
>  			break;
>  
> +		case DC_DPMS_FAILED_HANDSHAKE:
>  		case DC_DPMS_SKIPPED_HANDSHAKE:
>  			return step_result;
>  
> -- 
> 2.56.0
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-15  7:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-28 20:26 [PATCH] drm/amd/display: Abort DPMS ON when enabling the link fails Abdulla Bubshait
2026-11-15  7:35 ` Wayne Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox