Patchwork [Natty,SRU] drm/i915: fix CB tuning check for ILK+

login
register
mail settings
Submitter Stefan Bader
Date Nov. 17, 2011, 11:26 a.m.
Message ID <4EC4EF49.1050401@canonical.com>
Download mbox | patch
Permalink /patch/126188/
State New
Headers show

Comments

Stefan Bader - Nov. 17, 2011, 11:26 a.m.
On 16.11.2011 10:45, TImo Aaltonen wrote:
> 
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/891031
> 
> This patch fixes panel corruption on my T420s which occurs after
> plugging an external monitor to the vga port. Originally from 3.1,
> applies to 3.0 too but I'll post this upstream to include in the stable
> series.
> 
> upstream commit cb0e093162d7b6589c2217a00e2abfef686b32d6
> 
> Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
> 
> 
> 
Having the maintainer agreeing is good. So I tried to go forward and get the
patch into Natty. But the submitted patch does not apply to Natty. While it can
be resolved that looks ok, it makes me a bit suspicious about the having tested
part for Natty... Attached is the backport version (also including the
signed-off-by block in the style we would like to see in submitted patches
(without the acks of course)). Is that what got really tested?

-Stefan

Patch

From 92e30fe36ce949d2634b40e82d9f5c84baade25f Mon Sep 17 00:00:00 2001
From: Jesse Barnes <jbarnes@virtuousgeek.org>
Date: Thu, 28 Jul 2011 14:50:30 -0700
Subject: [PATCH] drm/i915: fix CB tuning check for ILK+

CB tuning is needed to handle potential process variations that might
cause clock jitter for certain PLL settings.  However, we were setting
it incorrectly since we were using the wrong M value as a check (M1 when
we needed to use the whole M value).  Fix it up, making my HDMI
attached display a little prettier (used to have occasional dots crawl
across the display).

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>

(backported from commit cb0e093162d7b6589c2217a00e2abfef686b32d6 upstream)
BugLink: http://bugs.launchpad.net/bugs/891031
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index dc51881..2c8a234 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4346,7 +4346,7 @@  static int intel_crtc_mode_set(struct drm_crtc *crtc,
 		} else if (is_sdvo && is_tv)
 			factor = 20;
 
-		if (clock.m1 < factor * clock.n)
+		if (clock.m < factor * clock.n)
 			fp |= FP_CB_TUNE;
 	}
 
-- 
1.7.5.4