summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2014-01-20 16:47:28 -0200
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2014-02-26 18:42:31 -0300
commit9ec9829b6c375ab0a4ddab5af7e3e53ddb863d74 (patch)
tree7033e49c22f3a4d94e6a45016c5c96c059a3c5da
parent301ca05ec23fc0cb2e1497e02749aebfb25e9354 (diff)
drm/i915: add gen8_irq_reset
So we can merge all the common code from postinstall and uninstall. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 0838a31b7abd..cba50f86d435 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2953,7 +2953,7 @@ static void valleyview_irq_preinstall(struct drm_device *dev)
POSTING_READ(VLV_IER);
}
-static void gen8_irq_preinstall(struct drm_device *dev)
+static void gen8_irq_reset(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
int pipe;
@@ -2978,6 +2978,11 @@ static void gen8_irq_preinstall(struct drm_device *dev)
ibx_irq_reset(dev);
}
+static void gen8_irq_preinstall(struct drm_device *dev)
+{
+ gen8_irq_reset(dev);
+}
+
static void ibx_hpd_irq_setup(struct drm_device *dev)
{
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
@@ -3238,30 +3243,13 @@ static int gen8_irq_postinstall(struct drm_device *dev)
static void gen8_irq_uninstall(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
- int pipe;
if (!dev_priv)
return;
intel_hpd_irq_uninstall(dev_priv);
- I915_WRITE(GEN8_MASTER_IRQ, 0);
-
- GEN8_IRQ_RESET_NDX(GT, 0);
- GEN8_IRQ_RESET_NDX(GT, 1);
- GEN8_IRQ_RESET_NDX(GT, 2);
- GEN8_IRQ_RESET_NDX(GT, 3);
-
- for_each_pipe(pipe)
- GEN8_IRQ_RESET_NDX(DE_PIPE, pipe);
-
- GEN5_IRQ_RESET(GEN8_DE_PORT_);
- GEN5_IRQ_RESET(GEN8_DE_MISC_);
- GEN5_IRQ_RESET(GEN8_PCU_);
-
- POSTING_READ(GEN8_PCU_IIR);
-
- ibx_irq_reset(dev);
+ gen8_irq_reset(dev);
}
static void valleyview_irq_uninstall(struct drm_device *dev)