Commit 6b25a887 authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: kill cargo-culted locking from power well code

We may not concurrently change the power wells code. Which
is already guaranteed since modesets aren't concurrent. That
leaves races against setup/teardown/suspend/resume, and for
those we already (try) rather hard not to hit concurrent
modesets.

No debug WARN_ON added since that would require us to grab the
modeset locks in init/suspend code. Which is again just cargo
culting since just grabbing the locks in those paths isn't good
enough, we need the right order of operations, too.

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 725a5b54
...@@ -4088,8 +4088,6 @@ void intel_init_power_well(struct drm_device *dev) ...@@ -4088,8 +4088,6 @@ void intel_init_power_well(struct drm_device *dev)
if (!IS_HASWELL(dev)) if (!IS_HASWELL(dev))
return; return;
mutex_lock(&dev->struct_mutex);
/* For now, we need the power well to be always enabled. */ /* For now, we need the power well to be always enabled. */
intel_set_power_well(dev, true); intel_set_power_well(dev, true);
...@@ -4097,8 +4095,6 @@ void intel_init_power_well(struct drm_device *dev) ...@@ -4097,8 +4095,6 @@ void intel_init_power_well(struct drm_device *dev)
* the driver is in charge now. */ * the driver is in charge now. */
if (I915_READ(HSW_PWR_WELL_BIOS) & HSW_PWR_WELL_ENABLE) if (I915_READ(HSW_PWR_WELL_BIOS) & HSW_PWR_WELL_ENABLE)
I915_WRITE(HSW_PWR_WELL_BIOS, 0); I915_WRITE(HSW_PWR_WELL_BIOS, 0);
mutex_unlock(&dev->struct_mutex);
} }
/* Set up chip specific power management-related functions */ /* Set up chip specific power management-related functions */
......
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