Commit 261e40b8 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Eliminate passing dev+dev_priv to {snb,ilk}_gt_irq_handler()

It looks silly to pass both dev and dev_priv to the snb/ilk gt irq
handlers. Just pass dev_priv.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1460571598-24452-12-git-send-email-ville.syrjala@linux.intel.comReviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 52894874
...@@ -1264,18 +1264,17 @@ static void ivybridge_parity_work(struct work_struct *work) ...@@ -1264,18 +1264,17 @@ static void ivybridge_parity_work(struct work_struct *work)
mutex_unlock(&dev_priv->dev->struct_mutex); mutex_unlock(&dev_priv->dev->struct_mutex);
} }
static void ivybridge_parity_error_irq_handler(struct drm_device *dev, u32 iir) static void ivybridge_parity_error_irq_handler(struct drm_i915_private *dev_priv,
u32 iir)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; if (!HAS_L3_DPF(dev_priv))
if (!HAS_L3_DPF(dev))
return; return;
spin_lock(&dev_priv->irq_lock); spin_lock(&dev_priv->irq_lock);
gen5_disable_gt_irq(dev_priv, GT_PARITY_ERROR(dev)); gen5_disable_gt_irq(dev_priv, GT_PARITY_ERROR(dev_priv));
spin_unlock(&dev_priv->irq_lock); spin_unlock(&dev_priv->irq_lock);
iir &= GT_PARITY_ERROR(dev); iir &= GT_PARITY_ERROR(dev_priv);
if (iir & GT_RENDER_L3_PARITY_ERROR_INTERRUPT_S1) if (iir & GT_RENDER_L3_PARITY_ERROR_INTERRUPT_S1)
dev_priv->l3_parity.which_slice |= 1 << 1; dev_priv->l3_parity.which_slice |= 1 << 1;
...@@ -1285,8 +1284,7 @@ static void ivybridge_parity_error_irq_handler(struct drm_device *dev, u32 iir) ...@@ -1285,8 +1284,7 @@ static void ivybridge_parity_error_irq_handler(struct drm_device *dev, u32 iir)
queue_work(dev_priv->wq, &dev_priv->l3_parity.error_work); queue_work(dev_priv->wq, &dev_priv->l3_parity.error_work);
} }
static void ilk_gt_irq_handler(struct drm_device *dev, static void ilk_gt_irq_handler(struct drm_i915_private *dev_priv,
struct drm_i915_private *dev_priv,
u32 gt_iir) u32 gt_iir)
{ {
if (gt_iir & if (gt_iir &
...@@ -1296,8 +1294,7 @@ static void ilk_gt_irq_handler(struct drm_device *dev, ...@@ -1296,8 +1294,7 @@ static void ilk_gt_irq_handler(struct drm_device *dev,
notify_ring(&dev_priv->engine[VCS]); notify_ring(&dev_priv->engine[VCS]);
} }
static void snb_gt_irq_handler(struct drm_device *dev, static void snb_gt_irq_handler(struct drm_i915_private *dev_priv,
struct drm_i915_private *dev_priv,
u32 gt_iir) u32 gt_iir)
{ {
...@@ -1314,8 +1311,8 @@ static void snb_gt_irq_handler(struct drm_device *dev, ...@@ -1314,8 +1311,8 @@ static void snb_gt_irq_handler(struct drm_device *dev,
GT_RENDER_CS_MASTER_ERROR_INTERRUPT)) GT_RENDER_CS_MASTER_ERROR_INTERRUPT))
DRM_DEBUG("Command parser error, gt_iir 0x%08x\n", gt_iir); DRM_DEBUG("Command parser error, gt_iir 0x%08x\n", gt_iir);
if (gt_iir & GT_PARITY_ERROR(dev)) if (gt_iir & GT_PARITY_ERROR(dev_priv))
ivybridge_parity_error_irq_handler(dev, gt_iir); ivybridge_parity_error_irq_handler(dev_priv, gt_iir);
} }
static __always_inline void static __always_inline void
...@@ -1838,7 +1835,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg) ...@@ -1838,7 +1835,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg)
POSTING_READ(VLV_MASTER_IER); POSTING_READ(VLV_MASTER_IER);
if (gt_iir) if (gt_iir)
snb_gt_irq_handler(dev, dev_priv, gt_iir); snb_gt_irq_handler(dev_priv, gt_iir);
if (pm_iir) if (pm_iir)
gen6_rps_irq_handler(dev_priv, pm_iir); gen6_rps_irq_handler(dev_priv, pm_iir);
...@@ -2280,9 +2277,9 @@ static irqreturn_t ironlake_irq_handler(int irq, void *arg) ...@@ -2280,9 +2277,9 @@ static irqreturn_t ironlake_irq_handler(int irq, void *arg)
I915_WRITE(GTIIR, gt_iir); I915_WRITE(GTIIR, gt_iir);
ret = IRQ_HANDLED; ret = IRQ_HANDLED;
if (INTEL_INFO(dev)->gen >= 6) if (INTEL_INFO(dev)->gen >= 6)
snb_gt_irq_handler(dev, dev_priv, gt_iir); snb_gt_irq_handler(dev_priv, gt_iir);
else else
ilk_gt_irq_handler(dev, dev_priv, gt_iir); ilk_gt_irq_handler(dev_priv, gt_iir);
} }
de_iir = I915_READ(DEIIR); de_iir = I915_READ(DEIIR);
......
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