From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3 v3] drm/i915: catch gtfifo errors on forcewake_put
Date: Wed, 8 Feb 2012 11:14:33 +0100 [thread overview]
Message-ID: <20120208101433.GA5030@phenom.ffwll.local> (raw)
In-Reply-To: <1328628110-5954-3-git-send-email-ben@bwidawsk.net>
On Tue, Feb 07, 2012 at 04:21:49PM +0100, Ben Widawsky wrote:
> This is similar to a patch I wrote several months ago. It's been updated
> for the new FORCEWAKE_MT, and it also no longer clears the debug
> register as it may be helpful to get that for the error state. Also
> recommended by Chris Wilson, use WARN() instead of DRM_ERROR, so we can
> get a backtrace.
>
> v2: Replace POSTING_READ with I915_READ_NOTRACE(GTFIFODBG). Recommended
> by Chris Wilson
>
> v3: Pull the fifo check out into a helper function to reduce code
> duplication
>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 15 +++++++++++++--
> 1 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 1658cfd..a7858a1 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -379,16 +379,27 @@ void gen6_gt_force_wake_get(struct drm_i915_private *dev_priv)
> dev_priv->display.force_wake_get(dev_priv);
> }
>
> +static void gen6_gt_check_fifodbg(struct drm_i915_private *dev_priv)
> +{
> + u32 gtfifodbg;
> + gtfifodbg = I915_READ_NOTRACE(GTFIFODBG);
> + WARN(gtfifodbg & GT_FIFO_CPU_ERROR_MASK,
> + "MMIO read or write has been dropped %x\n", gtfifodbg);
> + I915_WRITE_NOTRACE(GTFIFODBG, GT_FIFO_CPU_ERROR_MASK);
I think we should move the write out of line and only do it when we're
actually catching an error.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-02-08 10:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-07 15:21 [PATCH 0/3] GTFIFODBG Ben Widawsky
2012-02-07 15:21 ` [PATCH 1/3 v2] drm/i915: use gtfifodbg Ben Widawsky
2012-02-07 15:21 ` [PATCH 2/3 v3] drm/i915: catch gtfifo errors on forcewake_put Ben Widawsky
2012-02-07 16:41 ` Ben Widawsky
2012-02-08 10:14 ` Daniel Vetter [this message]
2012-02-07 15:21 ` [PATCH 3/3] drm/i915: check gtfifodbg after possibly failed writes Ben Widawsky
2012-02-08 10:15 ` Daniel Vetter
2012-02-08 10:28 ` Chris Wilson
2012-02-08 10:34 ` Ben Widawsky
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=20120208101433.GA5030@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=ben@bwidawsk.net \
--cc=intel-gfx@lists.freedesktop.org \
/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