[lkml]   [2020]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH AUTOSEL 5.5 117/542] drm/amd/display: Retrain dongles when SINK_COUNT becomes non-zero
    From: Harry Wentland <>

    [ Upstream commit 3eb6d7aca53d81ce888624f09cd44dc0302161e8 ]

    Two years ago the patch referenced by the Fixes tag stopped running
    dp_verify_link_cap_with_retries during DP detection when the reason
    for the detection was a short-pulse interrupt. This effectively meant
    that we were no longer doing the verify_link_cap training on active
    dongles when their SINK_COUNT changed from 0 to 1.

    A year ago this was partly remedied with:
    commit 80adaebd2d41 ("drm/amd/display: Don't skip link training for empty dongle")

    This made sure that we trained the dongle on initial hotplug (without
    connected downstream devices).

    This is all fine and dandy if it weren't for the fact that there are
    some dongles on the market that don't like link training when SINK_COUNT
    is 0 These dongles will in fact indicate a SINK_COUNT of 0 immediately
    after hotplug, even when a downstream device is connected, and then
    trigger a shortpulse interrupt indicating a SINK_COUNT change to 1.

    In order to play nicely we will need our policy to not link train an
    active DP dongle when SINK_COUNT is 0 but ensure we train it when the
    SINK_COUNT changes to 1.

    Call dp_verify_link_cap_with_retries on detection even when the detection
    is triggered from a short pulse interrupt.

    With this change we can also revert this commit which we'll do in a separate
    follow-up change:
    commit 80adaebd2d41 ("drm/amd/display: Don't skip link training for empty dongle")

    Fixes: 0301ccbaf67d ("drm/amd/display: DP Compliance 400.1.1 failure")
    Suggested-by: Louis Li <>
    Tested-by: Louis Li <>
    Cc: Wenjing Liu <>
    Cc: Hersen Wu <>
    Cc: Eric Yang <>
    Reviewed-by: Wenjing Liu <>
    Signed-off-by: Harry Wentland <>
    Signed-off-by: Alex Deucher <>
    Signed-off-by: Sasha Levin <>
    drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
    index 4619f94f0ac78..70846ae7d854d 100644
    --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
    +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
    @@ -968,8 +968,7 @@ static bool dc_link_detect_helper(struct dc_link *link,
    same_edid = is_same_edid(&prev_sink->dc_edid, &sink->dc_edid);

    if (link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT &&
    - sink_caps.transaction_type == DDC_TRANSACTION_TYPE_I2C_OVER_AUX &&
    - reason != DETECT_REASON_HPDRX) {
    + sink_caps.transaction_type == DDC_TRANSACTION_TYPE_I2C_OVER_AUX) {
    * TODO debug why Dell 2413 doesn't like
    * two link trainings
     \ /
      Last update: 2020-02-14 16:51    [W:2.228 / U:1.448 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site