diff options
author | Chris Wilson | 2017-03-03 10:00:56 +0100 |
---|---|---|
committer | Chris Wilson | 2017-03-03 10:39:39 +0100 |
commit | 8352aea3c3f44ea9065b77d3baedc58921710d49 (patch) | |
tree | 0bb7a5fc43d22eb9340967ab77590288dbd076c4 /drivers/gpu/drm/i915/i915_debugfs.c | |
parent | drm/i915: Drop spinlocks around adding to the client request list (diff) | |
download | kernel-qcow2-linux-8352aea3c3f44ea9065b77d3baedc58921710d49.tar.gz kernel-qcow2-linux-8352aea3c3f44ea9065b77d3baedc58921710d49.tar.xz kernel-qcow2-linux-8352aea3c3f44ea9065b77d3baedc58921710d49.zip |
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: Chris 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.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 15a76096fbb0..70acbbf50c75 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1354,12 +1354,14 @@ 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 - seq_printf(m, "Hangcheck inactive\n"); + else if (delayed_work_pending(&dev_priv->gpu_error.hangcheck_work)) + 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)); |