All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/7] drm/i915: Introduce intel_uncore_unclaimed_mmio
Date: Tue, 15 Dec 2015 16:46:50 +0200	[thread overview]
Message-ID: <20151215144650.GI4437@intel.com> (raw)
In-Reply-To: <1450189512-30360-2-git-send-email-mika.kuoppala@intel.com>

On Tue, Dec 15, 2015 at 04:25:07PM +0200, Mika Kuoppala wrote:
> Currently interrupt code is the only place checking
> for the unclaimed register access prior to actual register
> macros using the same functionality. Rename the function
> and make it return bool so that the possible error message
> context is clear in the caller side. The motivation is to allow
> usage of unclaimed detection on arbitrary places.
> 
> v2: rebase, s/access/mmio, s/dev/dev_priv
> 
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_drv.h     | 2 +-
>  drivers/gpu/drm/i915/i915_irq.c     | 3 ++-
>  drivers/gpu/drm/i915/intel_uncore.c | 5 ++---
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 9124085..82c43b6 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2731,7 +2731,7 @@ extern void intel_uncore_sanitize(struct drm_device *dev);
>  extern void intel_uncore_early_sanitize(struct drm_device *dev,
>  					bool restore_forcewake);
>  extern void intel_uncore_init(struct drm_device *dev);
> -extern void intel_uncore_check_errors(struct drm_device *dev);
> +extern bool intel_uncore_unclaimed_mmio(struct drm_i915_private *dev_priv);
>  extern void intel_uncore_fini(struct drm_device *dev);
>  extern void intel_uncore_forcewake_reset(struct drm_device *dev, bool restore);
>  const char *intel_uncore_forcewake_domain_to_str(const enum forcewake_domain_id id);
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 86664d1..a20dc64 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -2167,7 +2167,8 @@ static irqreturn_t ironlake_irq_handler(int irq, void *arg)
>  
>  	/* We get interrupts on unclaimed registers, so check for this before we
>  	 * do any I915_{READ,WRITE}. */
> -	intel_uncore_check_errors(dev);
> +	if (intel_uncore_unclaimed_mmio(dev_priv))
> +		DRM_ERROR("Unclaimed register before interrupt\n");

bdw+ too? Or do those work differently?

>  
>  	/* disable master interrupt before clearing iir  */
>  	de_ier = I915_READ(DEIER);
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 95e7803..34b60cb 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -1606,8 +1606,7 @@ bool intel_has_gpu_reset(struct drm_device *dev)
>  	return intel_get_gpu_reset(dev) != NULL;
>  }
>  
> -void intel_uncore_check_errors(struct drm_device *dev)
> +bool intel_uncore_unclaimed_mmio(struct drm_i915_private *dev_priv)
>  {
> -	if (check_for_unclaimed_mmio(to_i915(dev)))
> -		DRM_ERROR("Unclaimed register before interrupt\n");
> +	return check_for_unclaimed_mmio(dev_priv);
>  }
> -- 
> 2.5.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-12-15 14:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 14:25 [PATCH 1/7] drm/i915: Consolidate unclaimed mmio detection Mika Kuoppala
2015-12-15 14:25 ` [PATCH 2/7] drm/i915: Introduce intel_uncore_unclaimed_mmio Mika Kuoppala
2015-12-15 14:46   ` Ville Syrjälä [this message]
2015-12-15 15:02     ` Mika Kuoppala
2015-12-15 14:25 ` [PATCH 3/7] drm/i915: Detect and clear unclaimed access on resume Mika Kuoppala
2015-12-15 14:25 ` [PATCH 4/7] drm/i915: Do one shot unclaimed mmio detection less frequently Mika Kuoppala
2015-12-15 14:49   ` Chris Wilson
2015-12-15 14:50   ` Ville Syrjälä
2015-12-16  7:26   ` Mika Kuoppala
2015-12-15 14:25 ` [PATCH 5/7] drm/i915: Streamline unclaimed reg debug trace Mika Kuoppala
2015-12-15 14:25 ` [PATCH 6/7] drm/i915: Add unclaimed mmio check to runtime pm get/put Mika Kuoppala
2015-12-15 14:33   ` Chris Wilson
2015-12-15 14:25 ` [PATCH 7/7] drm/i915/chv: Add non claimed mmio checking Mika Kuoppala
2015-12-15 14:44   ` Ville Syrjälä
2015-12-15 14:56     ` Ville Syrjälä
2015-12-15 14:59     ` Mika Kuoppala
2015-12-15 17:45   ` [PATCH 7/7] drm/i915: Add non claimed mmio checking for vlv/chv Mika Kuoppala
2015-12-15 17:55     ` Ville Syrjälä
2016-01-08 14:59       ` Mika Kuoppala
2015-12-15 14:38 ` [PATCH 1/7] drm/i915: Consolidate unclaimed mmio detection Chris Wilson
2015-12-15 14:40   ` Mika Kuoppala
2016-01-08 14:58   ` Mika Kuoppala
2015-12-15 17:24 ` Mika Kuoppala

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=20151215144650.GI4437@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.