On Polaris and Vega, when used in DisplayPort SST mode, the PHY can lock up if
the stream is blanked prior to disabling the DisplayPort link. This lockup
then causes all subsequent AtomBIOS calls to fail, resulting in a GPU freeze
and a requirement to reset / re-POST the device to restore functionality.
Example failure:
[drm:atom_op_jump [amdgpu]] *ERROR* atombios stuck in loop for more than
20secs aborting
[drm:amdgpu_atom_execute_table_locked [amdgpu]] *ERROR* atombios stuck
executing D7B2 (len 824, WS 0, PS 0) @ 0xD901
[drm:amdgpu_atom_execute_table_locked [amdgpu]] *ERROR* atombios stuck
executing D66C (len 326, WS 0, PS 0) @ 0xD6F7
amdgpu 0000:01:00.0: [drm] *ERROR* dce110_link_encoder_enable_dp_output:
Failed to execute VBIOS command table!
<screeen is now offline and will not wake up until the amdgpu module is
removed and reinserted>
Tested to fix the long-standing DPMS-related screen hangs on a WX4100 with
attached Samsung Odyssey G9 over DisplayPort.
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=211425
Fixes: https://gitlab.freedesktop.org/drm/amd/-/issues/4648
Signed-off-by: Timothy Pearson <[email protected]>
---
drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 10 +++++++++-
1 file changed, 9 insertions(+), 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 83419e1a9036..201894266573 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
@@ -2372,7 +2372,15 @@ void link_set_dpms_off(struct pipe_ctx *pipe_ctx)
dc->hwss.disable_audio_stream(pipe_ctx);
update_psp_stream_config(pipe_ctx, true);
- dc->hwss.blank_stream(pipe_ctx);
+
+ /* Attempting to blank the stream in diplay port mode prior to power
+ * down can cause the PHY to freeze on Polaris and Vega, resulting
+ * in all subsequent AtomBIOS calls failing and requiring a card reset
+ * to recover.
+ */
+ if (pipe_ctx->stream->signal != SIGNAL_TYPE_DISPLAY_PORT) {
+ dc->hwss.blank_stream(pipe_ctx);
+ }
if
(pipe_ctx->link_config.dp_tunnel_settings.should_use_dp_bw_allocation)
deallocate_usb4_bandwidth(pipe_ctx->stream);
--
2.47.2