Commit 8ea0be4f authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter

drm/i915: Refactor vlv_display_irq_uninstall()

Pull the vlv display irq uninstall code into a separate function, for
eventual sharing with chv.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 70ee45e1
...@@ -3588,6 +3588,20 @@ static void gen8_irq_uninstall(struct drm_device *dev) ...@@ -3588,6 +3588,20 @@ static void gen8_irq_uninstall(struct drm_device *dev)
gen8_irq_reset(dev); gen8_irq_reset(dev);
} }
static void vlv_display_irq_uninstall(struct drm_i915_private *dev_priv)
{
/* Interrupt setup is already guaranteed to be single-threaded, this is
* just to make the assert_spin_locked check happy. */
spin_lock_irq(&dev_priv->irq_lock);
if (dev_priv->display_irqs_enabled)
valleyview_display_irqs_uninstall(dev_priv);
spin_unlock_irq(&dev_priv->irq_lock);
vlv_display_irq_reset(dev_priv);
dev_priv->irq_mask = 0;
}
static void valleyview_irq_uninstall(struct drm_device *dev) static void valleyview_irq_uninstall(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
...@@ -3601,16 +3615,7 @@ static void valleyview_irq_uninstall(struct drm_device *dev) ...@@ -3601,16 +3615,7 @@ static void valleyview_irq_uninstall(struct drm_device *dev)
I915_WRITE(HWSTAM, 0xffffffff); I915_WRITE(HWSTAM, 0xffffffff);
/* Interrupt setup is already guaranteed to be single-threaded, this is vlv_display_irq_uninstall(dev_priv);
* just to make the assert_spin_locked check happy. */
spin_lock_irq(&dev_priv->irq_lock);
if (dev_priv->display_irqs_enabled)
valleyview_display_irqs_uninstall(dev_priv);
spin_unlock_irq(&dev_priv->irq_lock);
vlv_display_irq_reset(dev_priv);
dev_priv->irq_mask = 0;
} }
static void cherryview_irq_uninstall(struct drm_device *dev) static void cherryview_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