From 8247a33d6b42958b9170416f32de8672217833c9 Mon Sep 17 00:00:00 2001 From: Fuad Hossain Date: Tue, 14 May 2019 18:16:24 -0400 Subject: [PATCH] disp: msm: dp: Reset dp sink power state during panel init Reset the dp sink power state during panel init. Sinks may still be in old power states from previous sessions, so reset the power to allow for a clean start to the dp session. CRs-Fixed: 2453351 Change-Id: I7e2a4c9bcdb8f69d2562ba098d80a1c7e8f9f620 Signed-off-by: Fuad Hossain --- msm/dp/dp_panel.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/msm/dp/dp_panel.c b/msm/dp/dp_panel.c index 0e48ed4ba1..a88e504bd7 100644 --- a/msm/dp/dp_panel.c +++ b/msm/dp/dp_panel.c @@ -6,6 +6,7 @@ #define pr_fmt(fmt) "[drm-dp] %s: " fmt, __func__ #include "dp_panel.h" +#include #include #define DP_KHZ_TO_HZ 1000 @@ -2459,6 +2460,9 @@ static int dp_panel_init_panel_info(struct dp_panel *dp_panel) panel = container_of(dp_panel, struct dp_panel_private, dp_panel); pinfo = &dp_panel->pinfo; + drm_dp_dpcd_writeb(panel->aux->drm_aux, DP_SET_POWER, DP_SET_POWER_D3); + /* 200us propagation time for the power down to take effect */ + usleep_range(200, 205); drm_dp_dpcd_writeb(panel->aux->drm_aux, DP_SET_POWER, DP_SET_POWER_D0); /*