summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2014-01-10 19:28:57 -0200
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2014-02-26 18:42:29 -0300
commit301f6ecba2fa413f8a7dd40c51ccf0d6b12b9779 (patch)
treecba989bec07410417f26efb3a6bd04caad337406
parentf59bebd8c6b0a346dad683621e8f300b901fc405 (diff)
drm/i915: extract ibx_irq_uninstall
Just like ibx_irq_preinstall. We'll call this from somewhere else in the next patch. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index db16cdb41dc6..4fd6c15c6590 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2898,7 +2898,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);
@@ -3214,6 +3213,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;
@@ -3280,12 +3292,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)