diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index fc3bd9b4037c..0ab9813a79b5 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -702,6 +702,9 @@ intel_dp_compute_config(struct intel_encoder *encoder, | |||
702 | /* Walk through all bpp values. Luckily they're all nicely spaced with 2 | 702 | /* Walk through all bpp values. Luckily they're all nicely spaced with 2 |
703 | * bpc in between. */ | 703 | * bpc in between. */ |
704 | bpp = min_t(int, 8*3, pipe_config->pipe_bpp); | 704 | bpp = min_t(int, 8*3, pipe_config->pipe_bpp); |
705 | if (is_edp(intel_dp) && dev_priv->edp.bpp) | ||
706 | bpp = min_t(int, bpp, dev_priv->edp.bpp); | ||
707 | |||
705 | for (; bpp >= 6*3; bpp -= 2*3) { | 708 | for (; bpp >= 6*3; bpp -= 2*3) { |
706 | mode_rate = intel_dp_link_required(target_clock, bpp); | 709 | mode_rate = intel_dp_link_required(target_clock, bpp); |
707 | 710 | ||
@@ -739,6 +742,7 @@ found: | |||
739 | intel_dp->link_bw = bws[clock]; | 742 | intel_dp->link_bw = bws[clock]; |
740 | intel_dp->lane_count = lane_count; | 743 | intel_dp->lane_count = lane_count; |
741 | adjusted_mode->clock = drm_dp_bw_code_to_link_rate(intel_dp->link_bw); | 744 | adjusted_mode->clock = drm_dp_bw_code_to_link_rate(intel_dp->link_bw); |
745 | pipe_config->pipe_bpp = bpp; | ||
742 | pipe_config->pixel_target_clock = target_clock; | 746 | pipe_config->pixel_target_clock = target_clock; |
743 | 747 | ||
744 | DRM_DEBUG_KMS("DP link bw %02x lane count %d clock %d bpp %d\n", | 748 | DRM_DEBUG_KMS("DP link bw %02x lane count %d clock %d bpp %d\n", |
@@ -751,20 +755,6 @@ found: | |||
751 | target_clock, adjusted_mode->clock, | 755 | target_clock, adjusted_mode->clock, |
752 | &pipe_config->dp_m_n); | 756 | &pipe_config->dp_m_n); |
753 | 757 | ||
754 | /* | ||
755 | * XXX: We have a strange regression where using the vbt edp bpp value | ||
756 | * for the link bw computation results in black screens, the panel only | ||
757 | * works when we do the computation at the usual 24bpp (but still | ||
758 | * requires us to use 18bpp). Until that's fully debugged, stay | ||
759 | * bug-for-bug compatible with the old code. | ||
760 | */ | ||
761 | if (is_edp(intel_dp) && dev_priv->edp.bpp) { | ||
762 | DRM_DEBUG_KMS("clamping display bpc (was %d) to eDP (%d)\n", | ||
763 | bpp, dev_priv->edp.bpp); | ||
764 | bpp = min_t(int, bpp, dev_priv->edp.bpp); | ||
765 | } | ||
766 | pipe_config->pipe_bpp = bpp; | ||
767 | |||
768 | return true; | 758 | return true; |
769 | } | 759 | } |
770 | 760 | ||