Message ID | 20240626084825.878565-4-Wayne.Lin@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix mst daisy chain light up issue after resume | expand |
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Fangzhi Zuo <jerry.zuo@amd.com> > -----Original Message----- > From: Wayne Lin <Wayne.Lin@amd.com> > Sent: Wednesday, June 26, 2024 4:48 AM > To: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org > Cc: lyude@redhat.com; jani.nikula@intel.com; imre.deak@intel.com; > daniel@ffwll.ch; Wentland, Harry <Harry.Wentland@amd.com>; Zuo, Jerry > <Jerry.Zuo@amd.com>; Lin, Wayne <Wayne.Lin@amd.com> > Subject: [PATCH 3/3] drm/amd/display: Solve mst monitors blank out problem > after resume > > [Why] > In dm resume, we firstly restore dc state and do the mst resume for topology > probing thereafter. If we change dpcd DP_MSTM_CTRL value after LT in mst > reume, it will cause light up problem on the hub. > > [How] > Revert the commit 202dc359adda ("drm/amd/display: Defer handling mst up > request in resume"). And adjust the reason to trigger dc_link_detect by > DETECT_REASON_RESUMEFROMS3S4. > > Fixes: 202dc359adda ("drm/amd/display: Defer handling mst up request in > resume") > Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > index c64cc2378a94..b01452eb0981 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > @@ -2569,6 +2569,7 @@ static void resume_mst_branch_status(struct > drm_dp_mst_topology_mgr *mgr) > > ret = drm_dp_dpcd_writeb(mgr->aux, DP_MSTM_CTRL, > DP_MST_EN | > + DP_UP_REQ_EN | > DP_UPSTREAM_IS_SRC); > if (ret < 0) { > drm_dbg_kms(mgr->dev, "mst write failed - undocked during > suspend?\n"); @@ -3171,7 +3172,7 @@ static int dm_resume(void *handle) > } else { > mutex_lock(&dm->dc_lock); > dc_exit_ips_for_hw_access(dm->dc); > - dc_link_detect(aconnector->dc_link, > DETECT_REASON_HPD); > + dc_link_detect(aconnector->dc_link, > DETECT_REASON_RESUMEFROMS3S4); > mutex_unlock(&dm->dc_lock); > } > > -- > 2.37.3
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index c64cc2378a94..b01452eb0981 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -2569,6 +2569,7 @@ static void resume_mst_branch_status(struct drm_dp_mst_topology_mgr *mgr) ret = drm_dp_dpcd_writeb(mgr->aux, DP_MSTM_CTRL, DP_MST_EN | + DP_UP_REQ_EN | DP_UPSTREAM_IS_SRC); if (ret < 0) { drm_dbg_kms(mgr->dev, "mst write failed - undocked during suspend?\n"); @@ -3171,7 +3172,7 @@ static int dm_resume(void *handle) } else { mutex_lock(&dm->dc_lock); dc_exit_ips_for_hw_access(dm->dc); - dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD); + dc_link_detect(aconnector->dc_link, DETECT_REASON_RESUMEFROMS3S4); mutex_unlock(&dm->dc_lock); }
[Why] In dm resume, we firstly restore dc state and do the mst resume for topology probing thereafter. If we change dpcd DP_MSTM_CTRL value after LT in mst reume, it will cause light up problem on the hub. [How] Revert the commit 202dc359adda ("drm/amd/display: Defer handling mst up request in resume"). And adjust the reason to trigger dc_link_detect by DETECT_REASON_RESUMEFROMS3S4. Fixes: 202dc359adda ("drm/amd/display: Defer handling mst up request in resume") Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)