Commit dc1d0136 authored by Imre Deak's avatar Imre Deak Committed by Daniel Vetter

drm/i915: move getting struct_mutex lower in the callstack during GPU reset

Getting struct_mutex around the whole intel_enable_gt_powersave()
function is not necessary, since it's only needed for the ILK path
therein.

This will make intel_enable_gt_powersave() useable on the RPM resume
path for >=GEN6 (added in an upcoming patch to reset the RPS state
during RPM resume), where we can't (and need not) get this mutex.
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent d46c0517
...@@ -781,11 +781,8 @@ int i915_reset(struct drm_device *dev) ...@@ -781,11 +781,8 @@ int i915_reset(struct drm_device *dev)
* reset and the re-install of drm irq. Skip for ironlake per * reset and the re-install of drm irq. Skip for ironlake per
* previous concerns that it doesn't respond well to some forms * previous concerns that it doesn't respond well to some forms
* of re-init after reset. */ * of re-init after reset. */
if (INTEL_INFO(dev)->gen > 5) { if (INTEL_INFO(dev)->gen > 5)
mutex_lock(&dev->struct_mutex);
intel_enable_gt_powersave(dev); intel_enable_gt_powersave(dev);
mutex_unlock(&dev->struct_mutex);
}
intel_hpd_init(dev); intel_hpd_init(dev);
} else { } else {
......
...@@ -4556,9 +4556,11 @@ void intel_enable_gt_powersave(struct drm_device *dev) ...@@ -4556,9 +4556,11 @@ void intel_enable_gt_powersave(struct drm_device *dev)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
if (IS_IRONLAKE_M(dev)) { if (IS_IRONLAKE_M(dev)) {
mutex_lock(&dev->struct_mutex);
ironlake_enable_drps(dev); ironlake_enable_drps(dev);
ironlake_enable_rc6(dev); ironlake_enable_rc6(dev);
intel_init_emon(dev); intel_init_emon(dev);
mutex_unlock(&dev->struct_mutex);
} else if (IS_GEN6(dev) || IS_GEN7(dev)) { } else if (IS_GEN6(dev) || IS_GEN7(dev)) {
/* /*
* PCU communication is slow and this doesn't need to be * PCU communication is slow and this doesn't need to be
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment