drm/i915: Clarify irq_lock locking, special cases
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 15 Sep 2014 12:55:29 +0000 (14:55 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 19 Sep 2014 12:43:21 +0000 (14:43 +0200)
Grab bag for all the special cases:
- i9xx_check_fifo_underruns is only called from crtc_enable hooks,
  i.e. process context.
- i915_enable_asle_pipestat is only called from interrupt postinstall
  hooks. So again process context.
- gen8_irq_power_well_post_enable is called from the runtime pm code,
  which again means process context.
- The open-coded hpd_irq_setup loop in _thaw is also running in process
  context.

So for all of them the plain _irq variant is sufficient.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_irq.c

index b8bd008..8ce1b13 100644 (file)
@@ -686,11 +686,10 @@ static int __i915_drm_thaw(struct drm_device *dev, bool restore_gtt_mappings)
                intel_modeset_init_hw(dev);
 
                {
-                       unsigned long irqflags;
-                       spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
+                       spin_lock_irq(&dev_priv->irq_lock);
                        if (dev_priv->display.hpd_irq_setup)
                                dev_priv->display.hpd_irq_setup(dev);
-                       spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
+                       spin_unlock_irq(&dev_priv->irq_lock);
                }
 
                intel_dp_mst_resume(dev);
Simple merge