Skip to content

Commit 061d06a

Browse files
mthierryickle
authored andcommitted
drm/i915: Export per-engine reset count info to debugfs
A new variable is added to export the reset counts to debugfs, this includes full gpu reset and engine reset count. This is useful for tests where they are expected to trigger reset; these counts are checked before and after the test to ensure the same. v2: Include reset engine count in i915_engine_info too (Chris). Cc: Chris Wilson <[email protected]> Cc: Mika Kuoppala <[email protected]> Signed-off-by: Arun Siluvery <[email protected]> Signed-off-by: Michel Thierry <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 702c8f8 commit 061d06a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

drivers/gpu/drm/i915/i915_debugfs.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,6 +1403,23 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused)
14031403
return 0;
14041404
}
14051405

1406+
static int i915_reset_info(struct seq_file *m, void *unused)
1407+
{
1408+
struct drm_i915_private *dev_priv = node_to_i915(m->private);
1409+
struct i915_gpu_error *error = &dev_priv->gpu_error;
1410+
struct intel_engine_cs *engine;
1411+
enum intel_engine_id id;
1412+
1413+
seq_printf(m, "full gpu reset = %u\n", i915_reset_count(error));
1414+
1415+
for_each_engine(engine, dev_priv, id) {
1416+
seq_printf(m, "%s = %u\n", engine->name,
1417+
i915_reset_engine_count(error, engine));
1418+
}
1419+
1420+
return 0;
1421+
}
1422+
14061423
static int ironlake_drpc_info(struct seq_file *m)
14071424
{
14081425
struct drm_i915_private *dev_priv = node_to_i915(m->private);
@@ -3285,6 +3302,7 @@ static int i915_display_info(struct seq_file *m, void *unused)
32853302
static int i915_engine_info(struct seq_file *m, void *unused)
32863303
{
32873304
struct drm_i915_private *dev_priv = node_to_i915(m->private);
3305+
struct i915_gpu_error *error = &dev_priv->gpu_error;
32883306
struct intel_engine_cs *engine;
32893307
enum intel_engine_id id;
32903308

@@ -3308,6 +3326,8 @@ static int i915_engine_info(struct seq_file *m, void *unused)
33083326
engine->hangcheck.seqno,
33093327
jiffies_to_msecs(jiffies - engine->hangcheck.action_timestamp),
33103328
engine->timeline->inflight_seqnos);
3329+
seq_printf(m, "\tReset count: %d\n",
3330+
i915_reset_engine_count(error, engine));
33113331

33123332
rcu_read_lock();
33133333

@@ -4820,6 +4840,7 @@ static const struct drm_info_list i915_debugfs_list[] = {
48204840
{"i915_huc_load_status", i915_huc_load_status_info, 0},
48214841
{"i915_frequency_info", i915_frequency_info, 0},
48224842
{"i915_hangcheck_info", i915_hangcheck_info, 0},
4843+
{"i915_reset_info", i915_reset_info, 0},
48234844
{"i915_drpc_info", i915_drpc_info, 0},
48244845
{"i915_emon_status", i915_emon_status, 0},
48254846
{"i915_ring_freq_table", i915_ring_freq_table, 0},

0 commit comments

Comments
 (0)