blob: b5dd0d8a45614f2bcf16b82c46644b7553296ab5 [file] [log] [blame]
From 9cdccab3f0ea875b9bc0f7a77eef020f5acd1daf Mon Sep 17 00:00:00 2001
From: Konstantin Khlebnikov <>
Date: Wed, 17 Jul 2013 10:22:58 +0400
Subject: drm/i915: fix long-standing SNB regression in power consumption after
resume v2
This patch fixes regression in power consumtion of sandy bridge gpu, which
exists since v3.6 Sometimes after resuming from s2ram gpu starts thinking that
it's extremely busy. After that it never reaches rc6 state.
Bug exists since kernel v3.6:
commit b4ae3f22d238617ca11610b29fde16cf8c0bc6e0
Author: Jesse Barnes <>
Date: Thu Jun 14 11:04:48 2012 -0700
drm/i915: load boot context at driver init time
For some reason RC6 is already enabled at the beginning of resuming process.
Following initliaztion breaks some internal state and confuses RPS engine.
This patch disables RC6 at the beginnig of resume and initialization.
I've rearranged initialization sequence, because intel_disable_gt_powersave()
needs initialized force_wake_get/put and some locks from the dev_priv.
Note: The culprit in the initialization sequence seems to be the write
to MBCTL added in the above mentioned commit. The first version of
this patch just held a forcewake reference across the clock gating
init functions, which seems to have been enought to gather quite a few
positive test reports. But since that smelled a bit like ad-hoc
duct-tape v2 now just disables rps/rc6 across the entire hw setup.
References: (patch v1)
Signed-off-by: Konstantin Khlebnikov <>
Cc: Daniel Vetter <>
Cc: Chris Wilson <>
Cc: Jesse Barnes <>
[danvet: Add note about v1 vs. v2 of this patch and use standard
layout for the commit citation. Also add the tested-bys from v1 and a
cc: stable.]
Cc: (Note: tiny conflict due to the addition of
the backlight lock in 3.11)
Tested-by: Alexander Kaltsas <> (v1)
Tested-by: rocko <> (v1)
Tested-by: JohnMB <> (v1)
Signed-off-by: Daniel Vetter <>
(cherry picked from commit 7dcd2677ea912573d9ed4bcd629b0023b2d11505)
[dbasehore: removed call to function that no longer exists, removed redundant
branch, and moved back spinlock initialization for conflict]
Signed-off-by: Derek Basehore <>
Signed-off-by: Darren Hart <>
drivers/gpu/drm/i915/intel_pm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index f895d1508df8..aa962ef827c4 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5489,8 +5489,7 @@ void intel_gt_sanitize(struct drm_device *dev)
/* BIOS often leaves RC6 enabled, but disable it for hw init */
- if (INTEL_INFO(dev)->gen >= 6)
- intel_disable_gt_powersave(dev);
+ intel_disable_gt_powersave(dev);
void intel_gt_init(struct drm_device *dev)