<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Harry Wentland <harry.wentland@amd.com><br>
<b>Sent:</b> Wednesday, December 19, 2018 2:14:11 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Zuo, Jerry<br>
<b>Subject:</b> [PATCH] drm/amd/display: Fix MST dp_blank REG_WAIT timeout</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">From: "Jerry (Fangzhi) Zuo" <Jerry.Zuo@amd.com><br>
<br>
Need to blank stream before deallocate MST payload.<br>
<br>
[drm:generic_reg_wait [amdgpu]] *ERROR* REG_WAIT timeout 10us * 3000 tries - dce110_stream_encoder_dp_blank line:944<br>
------------[ cut here ]------------<br>
WARNING: CPU: 0 PID: 2201 at /var/lib/dkms/amdgpu/18.50-690240/build/amd/amdgpu/../display/dc/dc_helper.c:249 generic_reg_wait+0xe7/0x160 [amdgpu]<br>
Call Trace:<br>
 dce110_stream_encoder_dp_blank+0x11c/0x180 [amdgpu]<br>
 core_link_disable_stream+0x40/0x230 [amdgpu]<br>
 ? generic_reg_update_ex+0xdb/0x130 [amdgpu]<br>
 dce110_reset_hw_ctx_wrap+0xb7/0x1f0 [amdgpu]<br>
 dce110_apply_ctx_to_hw+0x30/0x430 [amdgpu]<br>
 ? dce110_apply_ctx_for_surface+0x206/0x260 [amdgpu]<br>
 dc_commit_state+0x2ba/0x4d0 [amdgpu]<br>
 amdgpu_dm_atomic_commit_tail+0x297/0xd70 [amdgpu]<br>
 ? amdgpu_bo_pin_restricted+0x58/0x260 [amdgpu]<br>
 ? wait_for_completion_timeout+0x1f/0x120<br>
 ? wait_for_completion_interruptible+0x1c/0x160<br>
 commit_tail+0x3d/0x60 [drm_kms_helper]<br>
 drm_atomic_helper_commit+0xf6/0x100 [drm_kms_helper]<br>
 drm_atomic_connector_commit_dpms+0xe5/0xf0 [drm]<br>
 drm_mode_obj_set_property_ioctl+0x14f/0x250 [drm]<br>
 drm_mode_connector_property_set_ioctl+0x2e/0x40 [drm]<br>
 drm_ioctl+0x1e0/0x430 [drm]<br>
 ? drm_mode_connector_set_obj_prop+0x70/0x70 [drm]<br>
 ? ep_read_events_proc+0xb0/0xb0<br>
 ? ep_scan_ready_list.constprop.18+0x1e6/0x1f0<br>
 ? timerqueue_add+0x52/0x80<br>
 amdgpu_drm_ioctl+0x49/0x80 [amdgpu]<br>
 do_vfs_ioctl+0x90/0x5f0<br>
 SyS_ioctl+0x74/0x80<br>
 do_syscall_64+0x74/0x140<br>
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2<br>
---[ end trace 3ed7b77a97d60f72 ]---<br>
<br>
Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com><br>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com><br>
Acked-by: Harry Wentland <harry.wentland@amd.com><br>
Tested-by: Lyude Paul <lyude@redhat.com><br>
---<br>
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++--<br>
 1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c<br>
index a87db7ac2e46..3dd5f2717b53 100644<br>
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c<br>
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c<br>
@@ -2636,11 +2636,11 @@ void core_link_disable_stream(struct pipe_ctx *pipe_ctx, int option)<br>
 {<br>
         struct dc  *core_dc = pipe_ctx->stream->ctx->dc;<br>
 <br>
+       core_dc->hwss.blank_stream(pipe_ctx);<br>
+<br>
         if (pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST)<br>
                 deallocate_mst_payload(pipe_ctx);<br>
 <br>
-       core_dc->hwss.blank_stream(pipe_ctx);<br>
-<br>
         core_dc->hwss.disable_stream(pipe_ctx, option);<br>
 <br>
         disable_link(pipe_ctx->stream->link, pipe_ctx->stream->signal);<br>
-- <br>
2.19.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>