aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-09-09 14:58:02 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-10 10:11:43 -0400
commitdd8849c8f59ec1cee4809a0c5e603e045abe860e (patch)
tree215699ef6d8e3e5d694d6b3873e203b2fd9d900c
parent7839d956fc6aecbb66d645b4050e8e88e2e821cd (diff)
drm/i915: don't enable self-refresh on Ironlake
We don't know how to enable it safely, especially as outputs turn on and off. When disabling LP1 we also need to make sure LP2 and 3 are already disabled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29173 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29082 Reported-by: Chris Lord <chris@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Tested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@kernel.org Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h8
-rw-r--r--drivers/gpu/drm/i915/intel_display.c6
2 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index d094e9129223..4f5e15577e89 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -2206,9 +2206,17 @@
2206#define WM1_LP_SR_EN (1<<31) 2206#define WM1_LP_SR_EN (1<<31)
2207#define WM1_LP_LATENCY_SHIFT 24 2207#define WM1_LP_LATENCY_SHIFT 24
2208#define WM1_LP_LATENCY_MASK (0x7f<<24) 2208#define WM1_LP_LATENCY_MASK (0x7f<<24)
2209#define WM1_LP_FBC_LP1_MASK (0xf<<20)
2210#define WM1_LP_FBC_LP1_SHIFT 20
2209#define WM1_LP_SR_MASK (0x1ff<<8) 2211#define WM1_LP_SR_MASK (0x1ff<<8)
2210#define WM1_LP_SR_SHIFT 8 2212#define WM1_LP_SR_SHIFT 8
2211#define WM1_LP_CURSOR_MASK (0x3f) 2213#define WM1_LP_CURSOR_MASK (0x3f)
2214#define WM2_LP_ILK 0x4510c
2215#define WM2_LP_EN (1<<31)
2216#define WM3_LP_ILK 0x45110
2217#define WM3_LP_EN (1<<31)
2218#define WM1S_LP_ILK 0x45120
2219#define WM1S_LP_EN (1<<31)
2212 2220
2213/* Memory latency timer register */ 2221/* Memory latency timer register */
2214#define MLTR_ILK 0x11222 2222#define MLTR_ILK 0x11222
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 7c9103030036..19daead5b525 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3382,8 +3382,7 @@ static void ironlake_update_wm(struct drm_device *dev, int planea_clock,
3382 reg_value = I915_READ(WM1_LP_ILK); 3382 reg_value = I915_READ(WM1_LP_ILK);
3383 reg_value &= ~(WM1_LP_LATENCY_MASK | WM1_LP_SR_MASK | 3383 reg_value &= ~(WM1_LP_LATENCY_MASK | WM1_LP_SR_MASK |
3384 WM1_LP_CURSOR_MASK); 3384 WM1_LP_CURSOR_MASK);
3385 reg_value |= WM1_LP_SR_EN | 3385 reg_value |= (ilk_sr_latency << WM1_LP_LATENCY_SHIFT) |
3386 (ilk_sr_latency << WM1_LP_LATENCY_SHIFT) |
3387 (sr_wm << WM1_LP_SR_SHIFT) | cursor_wm; 3386 (sr_wm << WM1_LP_SR_SHIFT) | cursor_wm;
3388 3387
3389 I915_WRITE(WM1_LP_ILK, reg_value); 3388 I915_WRITE(WM1_LP_ILK, reg_value);
@@ -5669,6 +5668,9 @@ void intel_init_clock_gating(struct drm_device *dev)
5669 I915_WRITE(DISP_ARB_CTL, 5668 I915_WRITE(DISP_ARB_CTL,
5670 (I915_READ(DISP_ARB_CTL) | 5669 (I915_READ(DISP_ARB_CTL) |
5671 DISP_FBC_WM_DIS)); 5670 DISP_FBC_WM_DIS));
5671 I915_WRITE(WM3_LP_ILK, 0);
5672 I915_WRITE(WM2_LP_ILK, 0);
5673 I915_WRITE(WM1_LP_ILK, 0);
5672 } 5674 }
5673 /* 5675 /*
5674 * Based on the document from hardware guys the following bits 5676 * Based on the document from hardware guys the following bits