From: Daniel Vetter <daniel@ffwll.ch>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 11/12] drm/i915: Eliminate passing dev+dev_priv to {snb, ilk}_gt_irq_handler()
Date: Wed, 13 Apr 2016 23:02:05 +0200 [thread overview]
Message-ID: <20160413210205.GG2510@phenom.ffwll.local> (raw)
In-Reply-To: <1460571598-24452-12-git-send-email-ville.syrjala@linux.intel.com>
On Wed, Apr 13, 2016 at 09:19:57PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> It looks silly to pass both dev and dev_priv to the snb/ilk gt irq
> handlers. Just pass dev_priv.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_irq.c | 27 ++++++++++++---------------
> 1 file changed, 12 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index dd8c02a5d490..7b07d1745b09 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1264,18 +1264,17 @@ out:
> 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))
> + if (!HAS_L3_DPF(dev_priv))
> return;
>
> 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);
>
> - iir &= GT_PARITY_ERROR(dev);
> + iir &= GT_PARITY_ERROR(dev_priv);
> if (iir & GT_RENDER_L3_PARITY_ERROR_INTERRUPT_S1)
> 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)
> queue_work(dev_priv->wq, &dev_priv->l3_parity.error_work);
> }
>
> -static void ilk_gt_irq_handler(struct drm_device *dev,
> - struct drm_i915_private *dev_priv,
> +static void ilk_gt_irq_handler(struct drm_i915_private *dev_priv,
> u32 gt_iir)
> {
> if (gt_iir &
> @@ -1296,8 +1294,7 @@ static void ilk_gt_irq_handler(struct drm_device *dev,
> notify_ring(&dev_priv->engine[VCS]);
> }
>
> -static void snb_gt_irq_handler(struct drm_device *dev,
> - struct drm_i915_private *dev_priv,
> +static void snb_gt_irq_handler(struct drm_i915_private *dev_priv,
> u32 gt_iir)
> {
>
> @@ -1314,8 +1311,8 @@ static void snb_gt_irq_handler(struct drm_device *dev,
> GT_RENDER_CS_MASTER_ERROR_INTERRUPT))
> DRM_DEBUG("Command parser error, gt_iir 0x%08x\n", gt_iir);
>
> - if (gt_iir & GT_PARITY_ERROR(dev))
> - ivybridge_parity_error_irq_handler(dev, gt_iir);
> + if (gt_iir & GT_PARITY_ERROR(dev_priv))
> + ivybridge_parity_error_irq_handler(dev_priv, gt_iir);
> }
>
> static __always_inline void
> @@ -1838,7 +1835,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg)
> POSTING_READ(VLV_MASTER_IER);
>
> if (gt_iir)
> - snb_gt_irq_handler(dev, dev_priv, gt_iir);
> + snb_gt_irq_handler(dev_priv, gt_iir);
> if (pm_iir)
> gen6_rps_irq_handler(dev_priv, pm_iir);
>
> @@ -2280,9 +2277,9 @@ static irqreturn_t ironlake_irq_handler(int irq, void *arg)
> I915_WRITE(GTIIR, gt_iir);
> ret = IRQ_HANDLED;
> if (INTEL_INFO(dev)->gen >= 6)
> - snb_gt_irq_handler(dev, dev_priv, gt_iir);
> + snb_gt_irq_handler(dev_priv, gt_iir);
> else
> - ilk_gt_irq_handler(dev, dev_priv, gt_iir);
> + ilk_gt_irq_handler(dev_priv, gt_iir);
> }
>
> de_iir = I915_READ(DEIIR);
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-13 21:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-13 18:19 [PATCH 00/12] drm/i915: VLV/CHV irq handler fixes ville.syrjala
2016-04-13 18:19 ` [PATCH 01/12] drm/i915: Use GEN8_MASTER_IRQ_CONTROL consistently ville.syrjala
2016-04-13 18:19 ` [PATCH 02/12] drm/i915: Set up VLV_MASTER_IER consistently ville.syrjala
2016-04-13 18:19 ` [PATCH 03/12] drm/i915: Clear VLV_IIR after PIPESTAT ville.syrjala
2016-04-13 18:19 ` [PATCH 04/12] drm/i915: Clear VLV_MASTER_IER around irq processing ville.syrjala
2016-04-13 18:19 ` [PATCH 05/12] drm/i915: Clear VLV_IER " ville.syrjala
2016-04-13 20:53 ` Chris Wilson
2016-04-14 8:22 ` Ville Syrjälä
2016-04-14 8:32 ` Chris Wilson
2016-04-14 8:49 ` Ville Syrjälä
2016-04-14 9:36 ` Chris Wilson
2016-04-14 12:30 ` Ville Syrjälä
2016-04-14 12:47 ` Mika Kuoppala
2016-04-15 7:32 ` Mika Kuoppala
2016-04-13 18:19 ` [PATCH 06/12] drm/i915: Eliminate loop from VLV irq handler ville.syrjala
2016-04-13 18:19 ` [PATCH 07/12] drm/i915: Move variables to narrower scope in VLV/CHV irq handlers ville.syrjala
2016-04-13 18:19 ` [PATCH 08/12] drm/i915: Split PORT_HOTPLUG_STAT ack out from i9xx_hpd_irq_handler() ville.syrjala
2016-04-13 18:19 ` [PATCH 09/12] drm/i915: Split VLV/CVH PIPESTAT handling into ack+handler ville.syrjala
2016-04-13 18:19 ` [PATCH 10/12] drm/i915: Move gt/pm irq handling out from irq disabled section on VLV ville.syrjala
2016-04-13 18:19 ` [PATCH 11/12] drm/i915: Eliminate passing dev+dev_priv to {snb, ilk}_gt_irq_handler() ville.syrjala
2016-04-13 21:02 ` Daniel Vetter [this message]
2016-04-13 18:19 ` [PATCH 12/12] drm/i915: Split gen8_gt_irq_handler into ack+handle ville.syrjala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160413210205.GG2510@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox