summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2014-01-20 16:41:28 -0200
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2014-02-26 18:42:31 -0300
commit301ca05ec23fc0cb2e1497e02749aebfb25e9354 (patch)
tree5adccb4807ceeefb5ebb6d7bd3c7dfacfc6769f7
parentd2b3048eea70292deac2d66440ec4f20c833e197 (diff)
drm/i915: add ironlake_irq_reset
To merge the common code of ironlake_irq_preinstall and ironlake_irq_uninstall. We should also probably do something about that HSWSTAM write on a later commit. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index f9237aa95e7d..0838a31b7abd 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2902,11 +2902,9 @@ static void gen5_gt_irq_reset(struct drm_device *dev)
/* drm_dma.h hooks
*/
-static void ironlake_irq_preinstall(struct drm_device *dev)
+static void ironlake_irq_reset(struct drm_device *dev)
{
- drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
-
- I915_WRITE(HWSTAM, 0xeffe);
+ struct drm_i915_private *dev_priv = dev->dev_private;
GEN5_IRQ_RESET(DE);
if (IS_GEN7(dev))
@@ -2917,6 +2915,15 @@ static void ironlake_irq_preinstall(struct drm_device *dev)
ibx_irq_reset(dev);
}
+static void ironlake_irq_preinstall(struct drm_device *dev)
+{
+ drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
+
+ I915_WRITE(HWSTAM, 0xeffe);
+
+ ironlake_irq_reset(dev);
+}
+
static void valleyview_irq_preinstall(struct drm_device *dev)
{
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
@@ -3292,13 +3299,7 @@ static void ironlake_irq_uninstall(struct drm_device *dev)
I915_WRITE(HWSTAM, 0xffffffff);
- GEN5_IRQ_RESET(DE);
- if (IS_GEN7(dev))
- I915_WRITE(GEN7_ERR_INT, 0xffffffff);
-
- gen5_gt_irq_reset(dev);
-
- ibx_irq_reset(dev);
+ ironlake_irq_reset(dev);
}
static void i8xx_irq_preinstall(struct drm_device * dev)