summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/dp/dp_panel.c
diff options
context:
space:
mode:
authorKuogee Hsieh <khsieh@codeaurora.org>2020-11-03 21:49:00 +0100
committerRob Clark <robdclark@chromium.org>2020-11-10 21:39:31 +0100
commit231a04fcc6cb5b0e5f72c015d36462a17355f925 (patch)
treee26b47fae6b6e305a12ed98ee0dc7e84c999cfa7 /drivers/gpu/drm/msm/dp/dp_panel.c
parentdrm/msm/dp: fixes wrong connection state caused by failure of link train (diff)
downloadlinux-231a04fcc6cb5b0e5f72c015d36462a17355f925.tar.xz
linux-231a04fcc6cb5b0e5f72c015d36462a17355f925.zip
drm/msm/dp: deinitialize mainlink if link training failed
DP compo phy have to be enable to start link training. When link training failed phy need to be disabled so that next link traning can be proceed smoothly at next plug in. This patch de-initialize mainlink to disable phy if link training failed. This prevent system crash due to disp_cc_mdss_dp_link_intf_clk stuck at "off" state. This patch also perform checking power_on flag at dp_display_enable() and dp_display_disable() to avoid crashing when unplug cable while display is off. Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org> Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/dp/dp_panel.c')
-rw-r--r--drivers/gpu/drm/msm/dp/dp_panel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c b/drivers/gpu/drm/msm/dp/dp_panel.c
index 1b7a20dc2d8e..97dca3e378b7 100644
--- a/drivers/gpu/drm/msm/dp/dp_panel.c
+++ b/drivers/gpu/drm/msm/dp/dp_panel.c
@@ -197,7 +197,7 @@ int dp_panel_read_sink_caps(struct dp_panel *dp_panel,
if (!dp_panel->edid) {
DRM_ERROR("panel edid read failed\n");
/* check edid read fail is due to unplug */
- if (!dp_catalog_hpd_get_state_status(panel->catalog)) {
+ if (!dp_catalog_link_is_connected(panel->catalog)) {
rc = -ETIMEDOUT;
goto end;
}