drm/i915: Use the spin_lock_irq() family of functions (2/2) master
authorFrançois Tigeot <ftigeot@wolfpond.org>
Wed, 29 Jun 2016 19:21:22 +0000 (21:21 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Wed, 29 Jun 2016 19:22:13 +0000 (21:22 +0200)
Further reducing differences with Linux 4.3.

sys/dev/drm/i915/intel_runtime_pm.c
sys/dev/drm/i915/intel_uncore.c

index 685ecb1..f865676 100644 (file)
@@ -858,9 +858,9 @@ static bool vlv_power_well_enabled(struct drm_i915_private *dev_priv,
 static void vlv_display_power_well_init(struct drm_i915_private *dev_priv)
 {
 
-       lockmgr(&dev_priv->irq_lock, LK_EXCLUSIVE);
+       spin_lock_irq(&dev_priv->irq_lock);
        valleyview_enable_display_irqs(dev_priv);
-       lockmgr(&dev_priv->irq_lock, LK_RELEASE);
+       spin_unlock_irq(&dev_priv->irq_lock);
 
        /*
         * During driver initialization/resume we can avoid restoring the
@@ -876,9 +876,9 @@ static void vlv_display_power_well_init(struct drm_i915_private *dev_priv)
 
 static void vlv_display_power_well_deinit(struct drm_i915_private *dev_priv)
 {
-       lockmgr(&dev_priv->irq_lock, LK_EXCLUSIVE);
+       spin_lock_irq(&dev_priv->irq_lock);
        valleyview_disable_display_irqs(dev_priv);
-       lockmgr(&dev_priv->irq_lock, LK_RELEASE);
+       spin_unlock_irq(&dev_priv->irq_lock);
 
        vlv_power_sequencer_reset(dev_priv);
 }
index f5c0b20..2533e0a 100644 (file)
@@ -484,13 +484,14 @@ static void __intel_uncore_forcewake_put(struct drm_i915_private *dev_priv,
 void intel_uncore_forcewake_put(struct drm_i915_private *dev_priv,
                                enum forcewake_domains fw_domains)
 {
+       unsigned long irqflags;
 
        if (!dev_priv->uncore.funcs.force_wake_put)
                return;
 
-       lockmgr(&dev_priv->uncore.lock, LK_EXCLUSIVE);
+       spin_lock_irqsave(&dev_priv->uncore.lock, irqflags);
        __intel_uncore_forcewake_put(dev_priv, fw_domains);
-       lockmgr(&dev_priv->uncore.lock, LK_RELEASE);
+       spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags);
 }
 
 /**