]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
drm/i915/dp: Validate cached link rate and lane count before retraining
authorManasi Navare <manasi.d.navare@intel.com>
Thu, 6 Apr 2017 21:00:12 +0000 (14:00 -0700)
committerJani Nikula <jani.nikula@intel.com>
Wed, 12 Apr 2017 14:06:32 +0000 (17:06 +0300)
commit14c562c0cde36e87e69918244cdf51a544580d19
tree250c5f8899f8cbea26bbbfc99d958b031b2fdfae
parent10e9bd9ab0322a3929db0bf84ff1ca3f28ed0ee4
drm/i915/dp: Validate cached link rate and lane count before retraining

Currently intel_dp_check_link_status() tries to retrain the link if
Clock recovery or Channel EQ for any of the lanes indicated by
intel_dp->lane_count is not set. However these values cached in intel_dp
structure can be stale if link training has failed for these values
during previous modeset. Or these values can get stale since we have
now re read the DPCD registers or it can be 0 in case of connected boot
case.

This patch validates these values against the max link rate and max lane
count values.

This is absolutely required incase the common_rates or max lane count
are now different due to link fallback.

v2:
* Include the FIXME commnet inside the function (Ville Syrjala)
* Remove the redundant parenthesis (Ville Syrjala)

v3 by Jani:
* rebase on the DP refactoring series
* rename intel_dp_link_params_is_valid to intel_dp_link_params_valid
* minor stylistic changes

v4:
* Compare the link rate against max link rate not the
common_rates since common_rates does not account for the
lowered fallback link rate value. (Ville Syrjala)

v5:
* Fixed a warning for unused variable (Manasi)

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1491512412-30016-1-git-send-email-manasi.d.navare@intel.com
drivers/gpu/drm/i915/intel_dp.c