• Daniel Vetter's avatar
    drm: extract dp link train delay functions from radeon · 1a644cd4
    Daniel Vetter authored
    This requires a few changes since that dpcd value is above the
    range currently cached by radeon. I've check the dp specs, and
    above 0xf there's a big gap and nothing that looks like we should
    cache it while a given device is plugged in. It's also the same value
    that i915.ko uses.
    
    Hence extend the various dpcd arrays in the radeon driver, use
    proper symbolic constants where applicable (one place overallocated
    the dpcd array to 25 bytes). Then also drop the rd_interval cache -
    radeon_dp_link_train_init re-reads the dpcd block, so the values we'll
    consume in train_cr and train_ce will always be fresh.
    
    To avoid needless diff-churn, #define the old size of dpcd as the new
    one and keep it around.
    
    v2: Alex Deucher noticed one place where I've forgotten to replace 8
    with DP_RECEIVER_CAP_SIZE.
    Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    Acked-by: default avatarDave Airlie <airlied@gmail.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    1a644cd4
drm_dp_helper.h 11.9 KB