From: Abhinav Kumar <[email protected]> ST_DISPLAY_OFF check in msm_dp_bridge_atomic_enable() is used to check that if the display was disabled while still hotplugged, phy needs to be re-initialized.
This can be replaced with a different check as it just means the DP cable is connected but without display being powered on. Replace the ST_DISPLAY_OFF check with a combination of connected and power_on checks. Signed-off-by: Abhinav Kumar <[email protected]> Signed-off-by: Jessica Zhang <[email protected]> --- drivers/gpu/drm/msm/dp/dp_display.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 98f5274f123e..6535c1cccf84 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -1564,7 +1564,6 @@ void msm_dp_bridge_atomic_enable(struct drm_bridge *drm_bridge, struct msm_dp *dp = msm_dp_bridge->msm_dp_display; int rc = 0; struct msm_dp_display_private *msm_dp_display; - u32 hpd_state; bool force_link_train = false; msm_dp_display = container_of(dp, struct msm_dp_display_private, msm_dp_display); @@ -1585,7 +1584,6 @@ void msm_dp_bridge_atomic_enable(struct drm_bridge *drm_bridge, return; } - hpd_state = msm_dp_display->hpd_state; if (!dp->connected) { mutex_unlock(&msm_dp_display->event_mutex); return; @@ -1598,9 +1596,7 @@ void msm_dp_bridge_atomic_enable(struct drm_bridge *drm_bridge, return; } - hpd_state = msm_dp_display->hpd_state; - - if (hpd_state == ST_DISPLAY_OFF) { + if (dp->connected && !dp->power_on) { msm_dp_display_host_phy_init(msm_dp_display); force_link_train = true; } -- 2.50.1
