• Ville Syrjälä's avatar
    drm/i915: Implement WaEdpLinkRateDataReload · 672d6ca7
    Ville Syrjälä authored
    A lot of modern laptops use the Parade PS8461E MUX for eDP
    switching. The MUX can operate in jitter cleaning mode or
    redriver mode, the first one resulting in higher link
    quality. The jitter cleaning mode needs to know the link
    rate used and the MUX achieves this by snooping the
    LINK_BW_SET, LINK_RATE_SELECT and SUPPORTED_LINK_RATES
    DPCD accesses.
    
    When the MUX is powered down (seems this can happen whenever
    the display is turned off) it loses track of the snooped
    link rates so when we do the LINK_RATE_SELECT write it no
    longer knowns which link rate we're selecting, and thus it
    falls back to the lower quality redriver mode. This results
    in unstable high link rates (eg. usually 8.1Gbps link rate
    no longer works correctly).
    
    In order to avoid all that let's re-snoop SUPPORTED_LINK_RATES
    from the sink at the start of every link training.
    
    Unfortunately we don't have a way to detect the presence of
    the MUX. It looks like the set of laptops equipped with this
    MUX is fairly large and contains devices from multiple
    manufacturers. It may also still be growing with new models.
    So a quirk doesn't seem like a very easily maintainable
    option, thus we shall attempt to do this unconditionally on
    all machines that use LINK_RATE_SELECT. Hopefully this extra
    DPCD read doesn't cause issues for any unaffected machine.
    If that turns out to be the case we'll need to convert this
    into a quirk in the future.
    
    Cc: stable@vger.kernel.org
    Cc: Jason A. Donenfeld <Jason@zx2c4.com>
    Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
    Cc: Jani Nikula <jani.nikula@intel.com>
    Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6205Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220902070319.15395-1-ville.syrjala@linux.intel.comTested-by: default avatarAaron Ma <aaron.ma@canonical.com>
    Tested-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
    Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
    (cherry picked from commit 25899c59)
    Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
    672d6ca7
intel_dp_link_training.c 46.1 KB