• Manasi Navare's avatar
    drm/i915: Implement Link Rate fallback on Link training failure · 233ce881
    Manasi Navare authored
    If link training at a link rate optimal for a particular
    mode fails during modeset's atomic commit phase, then we
    let the modeset complete and then retry. We save the link rate
    value at which link training failed, update the link status property
    to "BAD" and use a lower link rate to prune the modes. It will redo
    the modeset on the current mode at lower link rate or if the current
    mode gets pruned due to lower link constraints then, it will send a
    hotplug uevent for userspace to handle it.
    
    This is also required to pass DP CTS tests 4.3.1.3, 4.3.1.4,
    4.3.1.6.
    
    v9:
    * Use the trimmed max values of link rate/lane count based on
    link train fallback (Daniel Vetter)
    v8:
    * Set link_status to BAD first and then call mode_valid (Jani Nikula)
    v7:
    Remove the redundant variable in previous patch itself
    v6:
    * Obtain link rate index from fallback_link_rate using
    the helper intel_dp_link_rate_index (Jani Nikula)
    * Include fallback within intel_dp_start_link_train (Jani Nikula)
    v5:
    * Move set link status to drm core (Daniel Vetter, Jani Nikula)
    v4:
    * Add fallback support for non DDI platforms too
    * Set connector->link status inside set_link_status function
    (Jani Nikula)
    v3:
    * Set link status property to BAd unconditionally (Jani Nikula)
    * Dont use two separate variables link_train_failed and link_status
    to indicate same thing (Jani Nikula)
    v2:
    * Squashed a few patches (Jani Nikula)
    Acked-by: default avatarTony Cheng <tony.cheng@amd.com>
    Acked-by: default avatarHarry Wentland <Harry.wentland@amd.com>
    Cc: Jani Nikula <jani.nikula@linux.intel.com>
    Cc: Daniel Vetter <daniel.vetter@intel.com>
    Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarManasi Navare <manasi.d.navare@intel.com>
    Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
    Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Link: http://patchwork.freedesktop.org/patch/msgid/d796cc0c2814d668a47ef43c464f9a4089d46d64.1481883920.git.jani.nikula@intel.com
    233ce881
intel_dp_link_training.c 9.34 KB