• Kuogee Hsieh's avatar
    drm/msm/dp: power off DP phy at suspend · f591dbb5
    Kuogee Hsieh authored
    Normal DP suspend operation contains two steps, display off followed
    by dp suspend, to complete system wide suspending cycle if display is
    up at that time. In this case, DP phy will be powered off at display
    off. However there is an exception case that depending on the timing
    of dongle plug in during system wide suspending, sometimes display off
    procedure may be skipped and dp suspend was called directly. In this
    case, dp phy is stay at powered on (phy->power_count = 1) so that at
    next resume dp driver crash at main link clock enable due to phy is
    not physically powered on. This patch will call dp_ctrl_off_link_stream()
    to tear down main link and power off phy at dp_pm_suspend() if main link
    had been brought up.
    
    Changes in V2:
    -- stashed changes into dp_ctrl.c
    -- add is_phy_on to monitor phy state
    
    Changes in V3:
    -- delete is_phy_on
    -- call dp_ctrl_off_link_stream() from dp_pm_suspend()
    
    Changes in V4:
    -- delete changes made at dp_power.c
    -- move main link status checking to dp_pm_suspend
    
    Changes in V5:
    -- correct commit id at Fixes tag
    
    Fixes: 8dbde399044b ("drm/msm/dp: handle irq_hpd with sink_count = 0 correctly)
    Signed-off-by: default avatarKuogee Hsieh <khsieh@codeaurora.org>
    Tested-by: default avatarStephen Boyd <swboyd@chromium.org>
    Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
    Link: https://lore.kernel.org/r/1622734846-14179-1-git-send-email-khsieh@codeaurora.orgSigned-off-by: default avatarRob Clark <robdclark@chromium.org>
    f591dbb5
dp_display.c 35.2 KB