aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-04-04 11:19:37 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-04-05 14:51:43 -0400
commit57c219633275c7e7413f8bc7be250dc092887458 (patch)
treef287379b9140bba441f65f22ea2531c5b984b77f /drivers/gpu/drm
parent2af8898bed4d127a2b0d9f5109f6089f7f60e424 (diff)
drm/i915: revert eDP bpp clamping code changes
The behaviour around handling the eDP bpp value from vbt has been slightly changed in commit 3600836585e3fdef0a1410d63fe5ce4015007aac Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed Mar 27 00:44:59 2013 +0100 drm/i915: convert DP autodither code to new infrastructure The old behaviour was that we used the plane's bpp (usually 24bpp) for computing the dp link bw, but set up the pipe with the bpp value from vbt if available. This takes the vbt bpp override into account even for the dp link bw configuration. On Paulo's hsw machine this resulted in a slower link clock and a black screen - but the mode actually /should/ fit even with the lower clock. Until we've cleared up simply stay bug-for-bug compatible with the old code. While at it, also restore a debug message lost in: commit 4e53c2e010e531b4a014692199e978482d471c7e Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed Mar 27 00:44:58 2013 +0100 drm/i915: precompute pipe bpp before touching the hw Cc: Paulo Zanoni <przanoni@gmail.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 8d33e2ee258f..482b5e570d84 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -698,9 +698,6 @@ intel_dp_compute_config(struct intel_encoder *encoder,
698 /* Walk through all bpp values. Luckily they're all nicely spaced with 2 698 /* Walk through all bpp values. Luckily they're all nicely spaced with 2
699 * bpc in between. */ 699 * bpc in between. */
700 bpp = min_t(int, 8*3, pipe_config->pipe_bpp); 700 bpp = min_t(int, 8*3, pipe_config->pipe_bpp);
701 if (is_edp(intel_dp) && dev_priv->edp.bpp)
702 bpp = min_t(int, bpp, dev_priv->edp.bpp);
703
704 for (; bpp >= 6*3; bpp -= 2*3) { 701 for (; bpp >= 6*3; bpp -= 2*3) {
705 mode_rate = intel_dp_link_required(target_clock, bpp); 702 mode_rate = intel_dp_link_required(target_clock, bpp);
706 703
@@ -738,7 +735,6 @@ found:
738 intel_dp->link_bw = bws[clock]; 735 intel_dp->link_bw = bws[clock];
739 intel_dp->lane_count = lane_count; 736 intel_dp->lane_count = lane_count;
740 adjusted_mode->clock = drm_dp_bw_code_to_link_rate(intel_dp->link_bw); 737 adjusted_mode->clock = drm_dp_bw_code_to_link_rate(intel_dp->link_bw);
741 pipe_config->pipe_bpp = bpp;
742 pipe_config->pixel_target_clock = target_clock; 738 pipe_config->pixel_target_clock = target_clock;
743 739
744 DRM_DEBUG_KMS("DP link bw %02x lane count %d clock %d bpp %d\n", 740 DRM_DEBUG_KMS("DP link bw %02x lane count %d clock %d bpp %d\n",
@@ -751,6 +747,20 @@ found:
751 target_clock, adjusted_mode->clock, 747 target_clock, adjusted_mode->clock,
752 &pipe_config->dp_m_n); 748 &pipe_config->dp_m_n);
753 749
750 /*
751 * XXX: We have a strange regression where using the vbt edp bpp value
752 * for the link bw computation results in black screens, the panel only
753 * works when we do the computation at the usual 24bpp (but still
754 * requires us to use 18bpp). Until that's fully debugged, stay
755 * bug-for-bug compatible with the old code.
756 */
757 if (is_edp(intel_dp) && dev_priv->edp.bpp) {
758 DRM_DEBUG_KMS("clamping display bpc (was %d) to eDP (%d)\n",
759 bpp, dev_priv->edp.bpp);
760 bpp = min_t(int, bpp, dev_priv->edp.bpp);
761 }
762 pipe_config->pipe_bpp = bpp;
763
754 return true; 764 return true;
755} 765}
756 766