Commit 8352aea3 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Differentiate between hangcheck waiting for timer or scheduler

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170303090056.19973-1-chris@chris-wilson.co.ukReviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
parent c8659efa
...@@ -1354,12 +1354,14 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused) ...@@ -1354,12 +1354,14 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused)
intel_runtime_pm_put(dev_priv); intel_runtime_pm_put(dev_priv);
if (delayed_work_pending(&dev_priv->gpu_error.hangcheck_work)) { if (timer_pending(&dev_priv->gpu_error.hangcheck_work.timer))
seq_printf(m, "Hangcheck active, fires in %dms\n", seq_printf(m, "Hangcheck active, timer fires in %dms\n",
jiffies_to_msecs(dev_priv->gpu_error.hangcheck_work.timer.expires - jiffies_to_msecs(dev_priv->gpu_error.hangcheck_work.timer.expires -
jiffies)); jiffies));
} else else if (delayed_work_pending(&dev_priv->gpu_error.hangcheck_work))
seq_printf(m, "Hangcheck inactive\n"); seq_puts(m, "Hangcheck active, work pending\n");
else
seq_puts(m, "Hangcheck inactive\n");
seq_printf(m, "GT active? %s\n", yesno(dev_priv->gt.awake)); seq_printf(m, "GT active? %s\n", yesno(dev_priv->gt.awake));
......
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