Commit 9f1b1d0b authored by Tvrtko Ursulin's avatar Tvrtko Ursulin

drm/i915/fdinfo: Don't show engine classes not present

Stop displaying engine classes with no engines - it is not a huge problem
if they are shown, since the values will correctly be all zeroes, but it
does count as misleading.
Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: 055634e4 ("drm/i915: Expose client engine utilisation via fdinfo")
Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: default avatarUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220616140056.559074-1-tvrtko.ursulin@linux.intel.com
parent 45c64ecf
...@@ -116,8 +116,9 @@ show_client_class(struct seq_file *m, ...@@ -116,8 +116,9 @@ show_client_class(struct seq_file *m,
total += busy_add(ctx, class); total += busy_add(ctx, class);
rcu_read_unlock(); rcu_read_unlock();
seq_printf(m, "drm-engine-%s:\t%llu ns\n", if (capacity)
uabi_class_names[class], total); seq_printf(m, "drm-engine-%s:\t%llu ns\n",
uabi_class_names[class], total);
if (capacity > 1) if (capacity > 1)
seq_printf(m, "drm-engine-capacity-%s:\t%u\n", seq_printf(m, "drm-engine-capacity-%s:\t%u\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment