diff options
author | Jani Nikula <jani.nikula@intel.com> | 2014-09-09 04:25:13 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-19 08:41:13 -0400 |
commit | 344c5bbcb7a282cc59e2f111c8801106c4fe315c (patch) | |
tree | 417ea0ac75ae1f40dfafc462b34c1bdf732ff4dd /drivers/gpu | |
parent | f8d8a672f9370278ae2c9752ad3021662dbc42fd (diff) |
drm/i915/edp: use lane count and link rate from DPCD for eDP
eDP panels are generally designed to support only a single clock and
lane configuration.
commit 56071a207602a451f0c46d3dcc8379b59ef576e2
Author: Jani Nikula <jani.nikula@intel.com>
Date: Tue May 6 14:56:52 2014 +0300
drm/i915: use lane count and link rate from VBT as minimums for eDP
should have started using the optimal link parameters for eDP
panels. Turns out a certain other OS uses DPCD instead of VBT, which
means trusting VBT on this may not be so reliable after all. Follow
suit.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81647
Tested-by: Adam Jirasek <libm3l@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79386
Tested-by: Narthana Epa <narthana.epa+freedesktop@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index ab7cd0a75bd5..72bf533596c8 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1068,23 +1068,15 @@ intel_dp_compute_config(struct intel_encoder *encoder, | |||
1068 | bpp = dev_priv->vbt.edp_bpp; | 1068 | bpp = dev_priv->vbt.edp_bpp; |
1069 | } | 1069 | } |
1070 | 1070 | ||
1071 | if (IS_BROADWELL(dev)) { | 1071 | /* |
1072 | /* Yes, it's an ugly hack. */ | 1072 | * Use the maximum clock and number of lanes the eDP panel |
1073 | min_lane_count = max_lane_count; | 1073 | * advertizes being capable of. The panels are generally |
1074 | DRM_DEBUG_KMS("forcing lane count to max (%u) on BDW\n", | 1074 | * designed to support only a single clock and lane |
1075 | min_lane_count); | 1075 | * configuration, and typically these values correspond to the |
1076 | } else if (dev_priv->vbt.edp_lanes) { | 1076 | * native resolution of the panel. |
1077 | min_lane_count = min(dev_priv->vbt.edp_lanes, | 1077 | */ |
1078 | max_lane_count); | 1078 | min_lane_count = max_lane_count; |
1079 | DRM_DEBUG_KMS("using min %u lanes per VBT\n", | 1079 | min_clock = max_clock; |
1080 | min_lane_count); | ||
1081 | } | ||
1082 | |||
1083 | if (dev_priv->vbt.edp_rate) { | ||
1084 | min_clock = min(dev_priv->vbt.edp_rate >> 3, max_clock); | ||
1085 | DRM_DEBUG_KMS("using min %02x link bw per VBT\n", | ||
1086 | bws[min_clock]); | ||
1087 | } | ||
1088 | } | 1080 | } |
1089 | 1081 | ||
1090 | for (; bpp >= 6*3; bpp -= 2*3) { | 1082 | for (; bpp >= 6*3; bpp -= 2*3) { |