drm/i915: extract ibx_irq_uninstall
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Tue, 1 Apr 2014 18:37:20 +0000 (15:37 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 1 Apr 2014 21:10:45 +0000 (23:10 +0200)
Just like ibx_irq_preinstall. We'll call this from somewhere else in
the next patch.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c

index 5e1a6d330c8cdff6ce7a674c2d417a060563a013..ad2c3de8766b163da2085d5d46b84c3b960e0098 100644 (file)
@@ -2904,7 +2904,6 @@ static void ironlake_irq_preinstall(struct drm_device *dev)
        I915_WRITE(HWSTAM, 0xeffe);
 
        GEN5_IRQ_RESET(DE);
-
        if (IS_GEN7(dev))
                I915_WRITE(GEN7_ERR_INT, 0xffffffff);
 
@@ -3277,6 +3276,19 @@ static int gen8_irq_postinstall(struct drm_device *dev)
        return 0;
 }
 
+static void ibx_irq_uninstall(struct drm_device *dev)
+{
+       struct drm_i915_private *dev_priv = dev->dev_private;
+
+       if (HAS_PCH_NOP(dev))
+               return;
+
+       GEN5_IRQ_RESET(SDE);
+
+       if (HAS_PCH_CPT(dev) || HAS_PCH_LPT(dev))
+               I915_WRITE(SERR_INT, 0xffffffff);
+}
+
 static void gen8_irq_uninstall(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
@@ -3348,12 +3360,7 @@ static void ironlake_irq_uninstall(struct drm_device *dev)
 
        gen5_gt_irq_reset(dev);
 
-       if (HAS_PCH_NOP(dev))
-               return;
-
-       GEN5_IRQ_RESET(SDE);
-       if (HAS_PCH_CPT(dev) || HAS_PCH_LPT(dev))
-               I915_WRITE(SERR_INT, 0xffffffff);
+       ibx_irq_uninstall(dev);
 }
 
 static void i8xx_irq_preinstall(struct drm_device * dev)