mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
drm/i915: Show instdone for each engine in debugfs
Although polling each engine quickly is preferable as it should give us a sample of each engine at roughly the same time, keep it simple and just sample the engine as print out the debug state. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190704200455.14870-3-chris@chris-wilson.co.uk
This commit is contained in:
parent
8f856c743c
commit
b8cade5959
@ -1076,8 +1076,6 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused)
|
|||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv = node_to_i915(m->private);
|
struct drm_i915_private *dev_priv = node_to_i915(m->private);
|
||||||
struct intel_engine_cs *engine;
|
struct intel_engine_cs *engine;
|
||||||
u64 acthd[I915_NUM_ENGINES];
|
|
||||||
struct intel_instdone instdone;
|
|
||||||
intel_wakeref_t wakeref;
|
intel_wakeref_t wakeref;
|
||||||
enum intel_engine_id id;
|
enum intel_engine_id id;
|
||||||
|
|
||||||
@ -1092,13 +1090,6 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
with_intel_runtime_pm(&dev_priv->runtime_pm, wakeref) {
|
|
||||||
for_each_engine(engine, dev_priv, id)
|
|
||||||
acthd[id] = intel_engine_get_active_head(engine);
|
|
||||||
|
|
||||||
intel_engine_get_instdone(dev_priv->engine[RCS0], &instdone);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (timer_pending(&dev_priv->gpu_error.hangcheck_work.timer))
|
if (timer_pending(&dev_priv->gpu_error.hangcheck_work.timer))
|
||||||
seq_printf(m, "Hangcheck active, timer fires in %dms\n",
|
seq_printf(m, "Hangcheck active, timer fires in %dms\n",
|
||||||
jiffies_to_msecs(dev_priv->gpu_error.hangcheck_work.timer.expires -
|
jiffies_to_msecs(dev_priv->gpu_error.hangcheck_work.timer.expires -
|
||||||
@ -1110,23 +1101,25 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused)
|
|||||||
|
|
||||||
seq_printf(m, "GT active? %s\n", yesno(dev_priv->gt.awake));
|
seq_printf(m, "GT active? %s\n", yesno(dev_priv->gt.awake));
|
||||||
|
|
||||||
for_each_engine(engine, dev_priv, id) {
|
with_intel_runtime_pm(&dev_priv->runtime_pm, wakeref) {
|
||||||
seq_printf(m, "%s: %d ms ago\n",
|
for_each_engine(engine, dev_priv, id) {
|
||||||
engine->name,
|
struct intel_instdone instdone;
|
||||||
jiffies_to_msecs(jiffies -
|
|
||||||
engine->hangcheck.action_timestamp));
|
|
||||||
|
|
||||||
seq_printf(m, "\tACTHD = 0x%08llx [current 0x%08llx]\n",
|
seq_printf(m, "%s: %d ms ago\n",
|
||||||
(long long)engine->hangcheck.acthd,
|
engine->name,
|
||||||
(long long)acthd[id]);
|
jiffies_to_msecs(jiffies -
|
||||||
|
engine->hangcheck.action_timestamp));
|
||||||
|
|
||||||
|
seq_printf(m, "\tACTHD = 0x%08llx [current 0x%08llx]\n",
|
||||||
|
(long long)engine->hangcheck.acthd,
|
||||||
|
intel_engine_get_active_head(engine));
|
||||||
|
|
||||||
|
intel_engine_get_instdone(engine, &instdone);
|
||||||
|
|
||||||
if (engine->id == RCS0) {
|
|
||||||
seq_puts(m, "\tinstdone read =\n");
|
seq_puts(m, "\tinstdone read =\n");
|
||||||
|
|
||||||
i915_instdone_info(dev_priv, m, &instdone);
|
i915_instdone_info(dev_priv, m, &instdone);
|
||||||
|
|
||||||
seq_puts(m, "\tinstdone accu =\n");
|
seq_puts(m, "\tinstdone accu =\n");
|
||||||
|
|
||||||
i915_instdone_info(dev_priv, m,
|
i915_instdone_info(dev_priv, m,
|
||||||
&engine->hangcheck.instdone);
|
&engine->hangcheck.instdone);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user