All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Differentiate between hangcheck waiting for timer or scheduler
@ 2017-03-02 21:01 Chris Wilson
  2017-03-02 21:48 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Chris Wilson @ 2017-03-02 21:01 UTC (permalink / raw)
  To: intel-gfx

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.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index ee4bf6f71cab..0656ccf0e0d4 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1334,11 +1334,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",
-			   jiffies_to_msecs(dev_priv->gpu_error.hangcheck_work.timer.expires -
-					    jiffies));
-	} else
+	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, timer fires in %dms\n",
+				   jiffies_to_msecs(dev_priv->gpu_error.hangcheck_work.timer.expires -
+						    jiffies));
+		else
+			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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-03-03  9:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.