All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915: Differentiate between hangcheck waiting for timer or scheduler
Date: Fri, 03 Mar 2017 11:13:15 +0200	[thread overview]
Message-ID: <8737eubu50.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20170303090056.19973-1-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Check timer_pending() as well as work_pending() to see if the timer for
> the hangcheck has already expired and the work is pending execution on
> some list somewhere.
>
> v2: Use a more compact if-chain
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index a33c09dba105..5b51c9d179ad 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1334,11 +1334,13 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused)
>  
>  	intel_runtime_pm_put(dev_priv);
>  
> -	if (delayed_work_pending(&dev_priv->gpu_error.hangcheck_work)) {
> -		seq_printf(m, "Hangcheck active, fires in %dms\n",
> +	if (timer_pending(&dev_priv->gpu_error.hangcheck_work.timer))
> +		seq_printf(m, "Hangcheck active, timer fires in %dms\n",
>  			   jiffies_to_msecs(dev_priv->gpu_error.hangcheck_work.timer.expires -
>  					    jiffies));
> -	} else
> +	else if (delayed_work_pending(&dev_priv->gpu_error.hangcheck_work))
> +		seq_printf(m, "Hangcheck active, work pending\n");
> +	else
>  		seq_printf(m, "Hangcheck inactive\n");
>  
>  	seq_printf(m, "GT active? %s\n", yesno(dev_priv->gt.awake));
> -- 
> 2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-03-03  9:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02 21:01 [PATCH] drm/i915: Differentiate between hangcheck waiting for timer or scheduler Chris Wilson
2017-03-02 21:48 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-03-02 22:12 ` [PATCH] " Chris Wilson
2017-03-03  9:00 ` [PATCH v2] " Chris Wilson
2017-03-03  9:13   ` Mika Kuoppala [this message]
2017-03-03  9:40     ` Chris Wilson
2017-03-03  9:48 ` ✓ Fi.CI.BAT: success for drm/i915: Differentiate between hangcheck waiting for timer or scheduler (rev2) Patchwork

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=8737eubu50.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 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.