diff options
-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 | ||