Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33f53719 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Show waiters in i915_hangcheck_info



It is convenient to know what processes are waiting when looking at
hangcheck status in debugfs.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161004201132.21801-8-chris@chris-wilson.co.uk
parent 1b36595f
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -1353,6 +1353,9 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused)
		seq_printf(m, "Hangcheck inactive\n");
		seq_printf(m, "Hangcheck inactive\n");


	for_each_engine_id(engine, dev_priv, id) {
	for_each_engine_id(engine, dev_priv, id) {
		struct intel_breadcrumbs *b = &engine->breadcrumbs;
		struct rb_node *rb;

		seq_printf(m, "%s:\n", engine->name);
		seq_printf(m, "%s:\n", engine->name);
		seq_printf(m, "\tseqno = %x [current %x, last %x]\n",
		seq_printf(m, "\tseqno = %x [current %x, last %x]\n",
			   engine->hangcheck.seqno,
			   engine->hangcheck.seqno,
@@ -1362,6 +1365,15 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused)
			   yesno(intel_engine_has_waiter(engine)),
			   yesno(intel_engine_has_waiter(engine)),
			   yesno(test_bit(engine->id,
			   yesno(test_bit(engine->id,
					  &dev_priv->gpu_error.missed_irq_rings)));
					  &dev_priv->gpu_error.missed_irq_rings)));
		spin_lock(&b->lock);
		for (rb = rb_first(&b->waiters); rb; rb = rb_next(rb)) {
			struct intel_wait *w = container_of(rb, typeof(*w), node);

			seq_printf(m, "\t%s [%d] waiting for %x\n",
				   w->tsk->comm, w->tsk->pid, w->seqno);
		}
		spin_unlock(&b->lock);

		seq_printf(m, "\tACTHD = 0x%08llx [current 0x%08llx]\n",
		seq_printf(m, "\tACTHD = 0x%08llx [current 0x%08llx]\n",
			   (long long)engine->hangcheck.acthd,
			   (long long)engine->hangcheck.acthd,
			   (long long)acthd[id]);
			   (long long)acthd[id]);