Commit fbdedaea authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Make ironlake_{enable,disable}_display_irq() static inlines

ironlake_{enable,disable}_display_irq() each just call
ilk_update_display_irq() so let's make them static inlines.

While at it s/ironlake/ilk/ to make things shorter, and a bit more
consistent with the ibx functions.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1448294777-13722-3-git-send-email-ville.syrjala@linux.intel.comReviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 14443261
...@@ -2751,10 +2751,19 @@ void valleyview_disable_display_irqs(struct drm_i915_private *dev_priv); ...@@ -2751,10 +2751,19 @@ void valleyview_disable_display_irqs(struct drm_i915_private *dev_priv);
void i915_hotplug_interrupt_update(struct drm_i915_private *dev_priv, void i915_hotplug_interrupt_update(struct drm_i915_private *dev_priv,
uint32_t mask, uint32_t mask,
uint32_t bits); uint32_t bits);
void void ilk_update_display_irq(struct drm_i915_private *dev_priv,
ironlake_enable_display_irq(struct drm_i915_private *dev_priv, u32 mask); uint32_t interrupt_mask,
void uint32_t enabled_irq_mask);
ironlake_disable_display_irq(struct drm_i915_private *dev_priv, u32 mask); static inline void
ilk_enable_display_irq(struct drm_i915_private *dev_priv, uint32_t bits)
{
ilk_update_display_irq(dev_priv, bits, bits);
}
static inline void
ilk_disable_display_irq(struct drm_i915_private *dev_priv, uint32_t bits)
{
ilk_update_display_irq(dev_priv, bits, 0);
}
void ibx_display_interrupt_update(struct drm_i915_private *dev_priv, void ibx_display_interrupt_update(struct drm_i915_private *dev_priv,
uint32_t interrupt_mask, uint32_t interrupt_mask,
uint32_t enabled_irq_mask); uint32_t enabled_irq_mask);
......
...@@ -215,7 +215,7 @@ void i915_hotplug_interrupt_update(struct drm_i915_private *dev_priv, ...@@ -215,7 +215,7 @@ void i915_hotplug_interrupt_update(struct drm_i915_private *dev_priv,
* @interrupt_mask: mask of interrupt bits to update * @interrupt_mask: mask of interrupt bits to update
* @enabled_irq_mask: mask of interrupt bits to enable * @enabled_irq_mask: mask of interrupt bits to enable
*/ */
static void ilk_update_display_irq(struct drm_i915_private *dev_priv, void ilk_update_display_irq(struct drm_i915_private *dev_priv,
uint32_t interrupt_mask, uint32_t interrupt_mask,
uint32_t enabled_irq_mask) uint32_t enabled_irq_mask)
{ {
...@@ -239,18 +239,6 @@ static void ilk_update_display_irq(struct drm_i915_private *dev_priv, ...@@ -239,18 +239,6 @@ static void ilk_update_display_irq(struct drm_i915_private *dev_priv,
} }
} }
void
ironlake_enable_display_irq(struct drm_i915_private *dev_priv, u32 mask)
{
ilk_update_display_irq(dev_priv, mask, mask);
}
void
ironlake_disable_display_irq(struct drm_i915_private *dev_priv, u32 mask)
{
ilk_update_display_irq(dev_priv, mask, 0);
}
/** /**
* ilk_update_gt_irq - update GTIMR * ilk_update_gt_irq - update GTIMR
* @dev_priv: driver private * @dev_priv: driver private
...@@ -2655,7 +2643,7 @@ static int ironlake_enable_vblank(struct drm_device *dev, unsigned int pipe) ...@@ -2655,7 +2643,7 @@ static int ironlake_enable_vblank(struct drm_device *dev, unsigned int pipe)
DE_PIPE_VBLANK(pipe); DE_PIPE_VBLANK(pipe);
spin_lock_irqsave(&dev_priv->irq_lock, irqflags); spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
ironlake_enable_display_irq(dev_priv, bit); ilk_enable_display_irq(dev_priv, bit);
spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags); spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
return 0; return 0;
...@@ -2710,7 +2698,7 @@ static void ironlake_disable_vblank(struct drm_device *dev, unsigned int pipe) ...@@ -2710,7 +2698,7 @@ static void ironlake_disable_vblank(struct drm_device *dev, unsigned int pipe)
DE_PIPE_VBLANK(pipe); DE_PIPE_VBLANK(pipe);
spin_lock_irqsave(&dev_priv->irq_lock, irqflags); spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
ironlake_disable_display_irq(dev_priv, bit); ilk_disable_display_irq(dev_priv, bit);
spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags); spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
} }
...@@ -3462,7 +3450,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev) ...@@ -3462,7 +3450,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
* setup is guaranteed to run in single-threaded context. But we * setup is guaranteed to run in single-threaded context. But we
* need it to make the assert_spin_locked happy. */ * need it to make the assert_spin_locked happy. */
spin_lock_irq(&dev_priv->irq_lock); spin_lock_irq(&dev_priv->irq_lock);
ironlake_enable_display_irq(dev_priv, DE_PCU_EVENT); ilk_enable_display_irq(dev_priv, DE_PCU_EVENT);
spin_unlock_irq(&dev_priv->irq_lock); spin_unlock_irq(&dev_priv->irq_lock);
} }
......
...@@ -128,9 +128,9 @@ static void ironlake_set_fifo_underrun_reporting(struct drm_device *dev, ...@@ -128,9 +128,9 @@ static void ironlake_set_fifo_underrun_reporting(struct drm_device *dev,
DE_PIPEB_FIFO_UNDERRUN; DE_PIPEB_FIFO_UNDERRUN;
if (enable) if (enable)
ironlake_enable_display_irq(dev_priv, bit); ilk_enable_display_irq(dev_priv, bit);
else else
ironlake_disable_display_irq(dev_priv, bit); ilk_disable_display_irq(dev_priv, bit);
} }
static void ivybridge_check_fifo_underruns(struct intel_crtc *crtc) static void ivybridge_check_fifo_underruns(struct intel_crtc *crtc)
...@@ -161,9 +161,9 @@ static void ivybridge_set_fifo_underrun_reporting(struct drm_device *dev, ...@@ -161,9 +161,9 @@ static void ivybridge_set_fifo_underrun_reporting(struct drm_device *dev,
if (!ivb_can_enable_err_int(dev)) if (!ivb_can_enable_err_int(dev))
return; return;
ironlake_enable_display_irq(dev_priv, DE_ERR_INT_IVB); ilk_enable_display_irq(dev_priv, DE_ERR_INT_IVB);
} else { } else {
ironlake_disable_display_irq(dev_priv, DE_ERR_INT_IVB); ilk_disable_display_irq(dev_priv, DE_ERR_INT_IVB);
if (old && if (old &&
I915_READ(GEN7_ERR_INT) & ERR_INT_FIFO_UNDERRUN(pipe)) { I915_READ(GEN7_ERR_INT) & ERR_INT_FIFO_UNDERRUN(pipe)) {
......
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