Commit 823f6b38 authored by Paulo Zanoni's avatar Paulo Zanoni Committed by Daniel Vetter

drm/i915: add gen8_irq_reset

So we can merge all the common code from postinstall and uninstall.

v2: - Rebase.
    - While at it, remove useless { and }.
Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent be30b29f
...@@ -2959,7 +2959,7 @@ static void valleyview_irq_preinstall(struct drm_device *dev) ...@@ -2959,7 +2959,7 @@ static void valleyview_irq_preinstall(struct drm_device *dev)
POSTING_READ(VLV_IER); 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; struct drm_i915_private *dev_priv = dev->dev_private;
int pipe; int pipe;
...@@ -2972,9 +2972,8 @@ static void gen8_irq_preinstall(struct drm_device *dev) ...@@ -2972,9 +2972,8 @@ static void gen8_irq_preinstall(struct drm_device *dev)
GEN8_IRQ_RESET_NDX(GT, 2); GEN8_IRQ_RESET_NDX(GT, 2);
GEN8_IRQ_RESET_NDX(GT, 3); GEN8_IRQ_RESET_NDX(GT, 3);
for_each_pipe(pipe) { for_each_pipe(pipe)
GEN8_IRQ_RESET_NDX(DE_PIPE, pipe); GEN8_IRQ_RESET_NDX(DE_PIPE, pipe);
}
GEN5_IRQ_RESET(GEN8_DE_PORT_); GEN5_IRQ_RESET(GEN8_DE_PORT_);
GEN5_IRQ_RESET(GEN8_DE_MISC_); GEN5_IRQ_RESET(GEN8_DE_MISC_);
...@@ -2983,6 +2982,11 @@ static void gen8_irq_preinstall(struct drm_device *dev) ...@@ -2983,6 +2982,11 @@ static void gen8_irq_preinstall(struct drm_device *dev)
ibx_irq_reset(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) static void ibx_hpd_irq_setup(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
...@@ -3301,28 +3305,13 @@ static int gen8_irq_postinstall(struct drm_device *dev) ...@@ -3301,28 +3305,13 @@ static int gen8_irq_postinstall(struct drm_device *dev)
static void gen8_irq_uninstall(struct drm_device *dev) static void gen8_irq_uninstall(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int pipe;
if (!dev_priv) if (!dev_priv)
return; return;
intel_hpd_irq_uninstall(dev_priv); intel_hpd_irq_uninstall(dev_priv);
I915_WRITE(GEN8_MASTER_IRQ, 0); gen8_irq_reset(dev);
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_);
ibx_irq_reset(dev);
} }
static void valleyview_irq_uninstall(struct drm_device *dev) static void valleyview_irq_uninstall(struct drm_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment