aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-01-26 11:03:04 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-01-28 11:22:27 -0500
commitf654449a28e9cce283d6e3ef22c31fe7d865dff5 (patch)
tree6060b590f33c76455276325bb86ec0d5b398e15d /drivers/gpu/drm
parent737b1506037788f1e01b2a4c5795d4180b2e2e00 (diff)
drm/i915: Display current hangcheck status in debugfs
For example, /sys/kernel/debug/dri/0/i915_hangcheck_info: Hangcheck active, fires in 15887800ms render ring: seqno = -4059 [current -583] action = 2 score = 0 ACTHD = 1ee8 [current 21f980] max ACTHD = 0 v2: Include expiration ETA. Can anyone spot a problem? v3: Convert for workqueued hangcheck (Mika) v4: Print seqnos as unsigned ints (Ville) v5: Print seqnos as hex (Chris) Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com) (v2) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v2) Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index b315f0196636..214a8e56cc2b 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1220,6 +1220,41 @@ out:
1220 return ret; 1220 return ret;
1221} 1221}
1222 1222
1223static int i915_hangcheck_info(struct seq_file *m, void *unused)
1224{
1225 struct drm_info_node *node = m->private;
1226 struct drm_i915_private *dev_priv = to_i915(node->minor->dev);
1227 struct intel_engine_cs *ring;
1228 int i;
1229
1230 if (!i915.enable_hangcheck) {
1231 seq_printf(m, "Hangcheck disabled\n");
1232 return 0;
1233 }
1234
1235 if (delayed_work_pending(&dev_priv->gpu_error.hangcheck_work)) {
1236 seq_printf(m, "Hangcheck active, fires in %dms\n",
1237 jiffies_to_msecs(dev_priv->gpu_error.hangcheck_work.timer.expires -
1238 jiffies));
1239 } else
1240 seq_printf(m, "Hangcheck inactive\n");
1241
1242 for_each_ring(ring, dev_priv, i) {
1243 seq_printf(m, "%s:\n", ring->name);
1244 seq_printf(m, "\tseqno = %x [current %x]\n",
1245 ring->hangcheck.seqno, ring->get_seqno(ring, false));
1246 seq_printf(m, "\taction = %d\n", ring->hangcheck.action);
1247 seq_printf(m, "\tscore = %d\n", ring->hangcheck.score);
1248 seq_printf(m, "\tACTHD = 0x%08llx [current 0x%08llx]\n",
1249 (long long)ring->hangcheck.acthd,
1250 (long long)intel_ring_get_active_head(ring));
1251 seq_printf(m, "\tmax ACTHD = 0x%08llx\n",
1252 (long long)ring->hangcheck.max_acthd);
1253 }
1254
1255 return 0;
1256}
1257
1223static int ironlake_drpc_info(struct seq_file *m) 1258static int ironlake_drpc_info(struct seq_file *m)
1224{ 1259{
1225 struct drm_info_node *node = m->private; 1260 struct drm_info_node *node = m->private;
@@ -4402,6 +4437,7 @@ static const struct drm_info_list i915_debugfs_list[] = {
4402 {"i915_gem_hws_vebox", i915_hws_info, 0, (void *)VECS}, 4437 {"i915_gem_hws_vebox", i915_hws_info, 0, (void *)VECS},
4403 {"i915_gem_batch_pool", i915_gem_batch_pool_info, 0}, 4438 {"i915_gem_batch_pool", i915_gem_batch_pool_info, 0},
4404 {"i915_frequency_info", i915_frequency_info, 0}, 4439 {"i915_frequency_info", i915_frequency_info, 0},
4440 {"i915_hangcheck_info", i915_hangcheck_info, 0},
4405 {"i915_drpc_info", i915_drpc_info, 0}, 4441 {"i915_drpc_info", i915_drpc_info, 0},
4406 {"i915_emon_status", i915_emon_status, 0}, 4442 {"i915_emon_status", i915_emon_status, 0},
4407 {"i915_ring_freq_table", i915_ring_freq_table, 0}, 4443 {"i915_ring_freq_table", i915_ring_freq_table, 0},