diff options
author | Li Peng <peng.li@linux.intel.com> | 2010-06-12 11:38:35 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-06-14 21:24:13 -0400 |
commit | 45ac22c81b1088f5ac08dc5367f78c192d68d756 (patch) | |
tree | 9e9f161b881715db58bf38fbebfde9990fde4819 /drivers/gpu | |
parent | c496fa1fff0248ef8cd637efb52b70dea7afaa9d (diff) |
drm/i915: Turn on 945 self-refresh only if single CRTC is active
Enable self-refresh on 945 when just one CRTC is activated.
Otherwise user would get display flicker with dual display.
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=27667
Signed-off-by: Li Peng <peng.li@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index a8d65b7cb72a..fdeff4353725 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4483,6 +4483,7 @@ static void intel_idle_update(struct work_struct *work) | |||
4483 | struct drm_device *dev = dev_priv->dev; | 4483 | struct drm_device *dev = dev_priv->dev; |
4484 | struct drm_crtc *crtc; | 4484 | struct drm_crtc *crtc; |
4485 | struct intel_crtc *intel_crtc; | 4485 | struct intel_crtc *intel_crtc; |
4486 | int enabled = 0; | ||
4486 | 4487 | ||
4487 | if (!i915_powersave) | 4488 | if (!i915_powersave) |
4488 | return; | 4489 | return; |
@@ -4491,21 +4492,22 @@ static void intel_idle_update(struct work_struct *work) | |||
4491 | 4492 | ||
4492 | i915_update_gfx_val(dev_priv); | 4493 | i915_update_gfx_val(dev_priv); |
4493 | 4494 | ||
4494 | if (IS_I945G(dev) || IS_I945GM(dev)) { | ||
4495 | DRM_DEBUG_DRIVER("enable memory self refresh on 945\n"); | ||
4496 | I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN_MASK | FW_BLC_SELF_EN); | ||
4497 | } | ||
4498 | |||
4499 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { | 4495 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { |
4500 | /* Skip inactive CRTCs */ | 4496 | /* Skip inactive CRTCs */ |
4501 | if (!crtc->fb) | 4497 | if (!crtc->fb) |
4502 | continue; | 4498 | continue; |
4503 | 4499 | ||
4500 | enabled++; | ||
4504 | intel_crtc = to_intel_crtc(crtc); | 4501 | intel_crtc = to_intel_crtc(crtc); |
4505 | if (!intel_crtc->busy) | 4502 | if (!intel_crtc->busy) |
4506 | intel_decrease_pllclock(crtc); | 4503 | intel_decrease_pllclock(crtc); |
4507 | } | 4504 | } |
4508 | 4505 | ||
4506 | if ((enabled == 1) && (IS_I945G(dev) || IS_I945GM(dev))) { | ||
4507 | DRM_DEBUG_DRIVER("enable memory self refresh on 945\n"); | ||
4508 | I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN_MASK | FW_BLC_SELF_EN); | ||
4509 | } | ||
4510 | |||
4509 | mutex_unlock(&dev->struct_mutex); | 4511 | mutex_unlock(&dev->struct_mutex); |
4510 | } | 4512 | } |
4511 | 4513 | ||