diff options
author | David John <davidjon@xenontk.org> | 2010-01-27 04:49:08 -0500 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-02-04 11:36:20 -0500 |
commit | 33c5fd121eabbccc9103daf6cda36941eb3c349f (patch) | |
tree | 1e262dd14b1e283e8343605a15ed3d6f8241ea0d /drivers | |
parent | 013d5aa2bbb2ceacba7a0dad7f2a0eb20133323f (diff) |
drm/i915: Disable SR when more than one pipe is enabled
Self Refresh should be disabled on dual plane configs. Otherwise, as
the SR watermark is not calculated for such configs, switching to non
VGA mode causes FIFO underrun and display flicker.
This fixes Korg Bug #14897.
Signed-off-by: David John <davidjon@xenontk.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 5f14dfbf715c..12775df1bbfd 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -2520,6 +2520,10 @@ static void g4x_update_wm(struct drm_device *dev, int planea_clock, | |||
2520 | sr_entries = roundup(sr_entries / cacheline_size, 1); | 2520 | sr_entries = roundup(sr_entries / cacheline_size, 1); |
2521 | DRM_DEBUG("self-refresh entries: %d\n", sr_entries); | 2521 | DRM_DEBUG("self-refresh entries: %d\n", sr_entries); |
2522 | I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN); | 2522 | I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN); |
2523 | } else { | ||
2524 | /* Turn off self refresh if both pipes are enabled */ | ||
2525 | I915_WRITE(FW_BLC_SELF, I915_READ(FW_BLC_SELF) | ||
2526 | & ~FW_BLC_SELF_EN); | ||
2523 | } | 2527 | } |
2524 | 2528 | ||
2525 | DRM_DEBUG("Setting FIFO watermarks - A: %d, B: %d, SR %d\n", | 2529 | DRM_DEBUG("Setting FIFO watermarks - A: %d, B: %d, SR %d\n", |
@@ -2563,6 +2567,10 @@ static void i965_update_wm(struct drm_device *dev, int planea_clock, | |||
2563 | srwm = 1; | 2567 | srwm = 1; |
2564 | srwm &= 0x3f; | 2568 | srwm &= 0x3f; |
2565 | I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN); | 2569 | I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN); |
2570 | } else { | ||
2571 | /* Turn off self refresh if both pipes are enabled */ | ||
2572 | I915_WRITE(FW_BLC_SELF, I915_READ(FW_BLC_SELF) | ||
2573 | & ~FW_BLC_SELF_EN); | ||
2566 | } | 2574 | } |
2567 | 2575 | ||
2568 | DRM_DEBUG_KMS("Setting FIFO watermarks - A: 8, B: 8, C: 8, SR %d\n", | 2576 | DRM_DEBUG_KMS("Setting FIFO watermarks - A: 8, B: 8, C: 8, SR %d\n", |
@@ -2631,6 +2639,10 @@ static void i9xx_update_wm(struct drm_device *dev, int planea_clock, | |||
2631 | if (srwm < 0) | 2639 | if (srwm < 0) |
2632 | srwm = 1; | 2640 | srwm = 1; |
2633 | I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN | (srwm & 0x3f)); | 2641 | I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN | (srwm & 0x3f)); |
2642 | } else { | ||
2643 | /* Turn off self refresh if both pipes are enabled */ | ||
2644 | I915_WRITE(FW_BLC_SELF, I915_READ(FW_BLC_SELF) | ||
2645 | & ~FW_BLC_SELF_EN); | ||
2634 | } | 2646 | } |
2635 | 2647 | ||
2636 | DRM_DEBUG_KMS("Setting FIFO watermarks - A: %d, B: %d, C: %d, SR %d\n", | 2648 | DRM_DEBUG_KMS("Setting FIFO watermarks - A: %d, B: %d, C: %d, SR %d\n", |