diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2013-08-19 12:18:07 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-23 08:52:32 -0400 |
commit | 215733fadb87709e91b3a622d786865292c9ab11 (patch) | |
tree | aff961af369cae544c2d9e50415b8f04faad1d75 /drivers/gpu/drm/i915/intel_display.c | |
parent | 3414caf63421762e57b26aa999e5187b42ee1606 (diff) |
drm/i915: grab force_wake when restoring LCPLL
If LCPLL is disabled, there's a chance we might be in package C8 state
or deeper, and we'll get a hard hang when restoring LCPLL (also, a red
led lights up on my motherboard). So grab the force_wake, which will
get us out of RC6 and, as a consequence, out of PC8+ (since we need
RC6 to get into PC8+).
Note: Discussions with hw designers are still ongoing what exactly
goes boom here. But I think we can go ahead and just merge this little
hack for now until it's clear what we actually need.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
[danvet: Add small note about the current state of the discussion
around this hack.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7a40427823c7..a2c8cb360ae8 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -6033,6 +6033,10 @@ void hsw_restore_lcpll(struct drm_i915_private *dev_priv) | |||
6033 | LCPLL_POWER_DOWN_ALLOW)) == LCPLL_PLL_LOCK) | 6033 | LCPLL_POWER_DOWN_ALLOW)) == LCPLL_PLL_LOCK) |
6034 | return; | 6034 | return; |
6035 | 6035 | ||
6036 | /* Make sure we're not on PC8 state before disabling PC8, otherwise | ||
6037 | * we'll hang the machine! */ | ||
6038 | dev_priv->uncore.funcs.force_wake_get(dev_priv); | ||
6039 | |||
6036 | if (val & LCPLL_POWER_DOWN_ALLOW) { | 6040 | if (val & LCPLL_POWER_DOWN_ALLOW) { |
6037 | val &= ~LCPLL_POWER_DOWN_ALLOW; | 6041 | val &= ~LCPLL_POWER_DOWN_ALLOW; |
6038 | I915_WRITE(LCPLL_CTL, val); | 6042 | I915_WRITE(LCPLL_CTL, val); |
@@ -6060,6 +6064,8 @@ void hsw_restore_lcpll(struct drm_i915_private *dev_priv) | |||
6060 | LCPLL_CD_SOURCE_FCLK_DONE) == 0, 1)) | 6064 | LCPLL_CD_SOURCE_FCLK_DONE) == 0, 1)) |
6061 | DRM_ERROR("Switching back to LCPLL failed\n"); | 6065 | DRM_ERROR("Switching back to LCPLL failed\n"); |
6062 | } | 6066 | } |
6067 | |||
6068 | dev_priv->uncore.funcs.force_wake_put(dev_priv); | ||
6063 | } | 6069 | } |
6064 | 6070 | ||
6065 | static void haswell_modeset_global_resources(struct drm_device *dev) | 6071 | static void haswell_modeset_global_resources(struct drm_device *dev) |