public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: prefer wide & slow to fast & narrow in DP configs
@ 2012-06-21 22:13 Jesse Barnes
  2012-06-22  1:13 ` Keith Packard
  0 siblings, 1 reply; 10+ messages in thread
From: Jesse Barnes @ 2012-06-21 22:13 UTC (permalink / raw)
  To: intel-gfx

High frequency link configurations have the potential to cause trouble
with long and/or cheap cables, so prefer slow and wide configurations
instead.  This patch has the potential to cause trouble for eDP
configurations that lie about available lanes, so if we run into that we
can make it conditional on eDP.

References: https://bugs.freedesktop.org/show_bug.cgi?id=45801
Tested-by: peter@colberg.org
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_dp.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 6538c46..df8800e 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -725,8 +725,8 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
 	bpp = adjusted_mode->private_flags & INTEL_MODE_DP_FORCE_6BPC ? 18 : 24;
 	mode_rate = intel_dp_link_required(adjusted_mode->clock, bpp);
 
-	for (lane_count = 1; lane_count <= max_lane_count; lane_count <<= 1) {
-		for (clock = 0; clock <= max_clock; clock++) {
+	for (clock = 0; clock <= max_clock; clock++) {
+		for (lane_count = 1; lane_count <= max_lane_count; lane_count <<= 1) {
 			int link_avail = intel_dp_max_data_rate(intel_dp_link_clock(bws[clock]), lane_count);
 
 			if (mode_rate <= link_avail) {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-08-06  0:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-21 22:13 [PATCH] drm/i915: prefer wide & slow to fast & narrow in DP configs Jesse Barnes
2012-06-22  1:13 ` Keith Packard
2012-06-22  9:05   ` Chris Wilson
2012-06-22 14:21     ` Adam Jackson
2012-06-22 16:29     ` Jesse Barnes
2012-06-22 17:42       ` Keith Packard
2012-06-22 17:40     ` Keith Packard
2012-06-22 17:53       ` Chris Wilson
2012-07-04  7:42         ` Daniel Vetter
2012-08-06  0:12           ` [3.2.y, 3.4.y, 3.5.y] " Jonathan Nieder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox