]> Git Repo - J-linux.git/commitdiff
drm/i915/fdinfo: Don't show engine classes not present
authorTvrtko Ursulin <[email protected]>
Thu, 16 Jun 2022 14:00:56 +0000 (15:00 +0100)
committerJani Nikula <[email protected]>
Mon, 20 Jun 2022 10:07:49 +0000 (13:07 +0300)
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: Tvrtko Ursulin <[email protected]>
Fixes: 055634e4b62f ("drm/i915: Expose client engine utilisation via fdinfo")
Cc: Umesh Nerlige Ramappa <[email protected]>
Reviewed-by: Umesh Nerlige Ramappa <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 9f1b1d0b2242171b2891a0398def233801601c14)
Signed-off-by: Jani Nikula <[email protected]>
drivers/gpu/drm/i915/i915_drm_client.c

index 18d38cb59923d01b760cd5ae53064bf82b93c6d2..b09d1d3865740378006cc497da2dd3b3bddf60ff 100644 (file)
@@ -116,8 +116,9 @@ show_client_class(struct seq_file *m,
                total += busy_add(ctx, class);
        rcu_read_unlock();
 
-       seq_printf(m, "drm-engine-%s:\t%llu ns\n",
-                  uabi_class_names[class], total);
+       if (capacity)
+               seq_printf(m, "drm-engine-%s:\t%llu ns\n",
+                          uabi_class_names[class], total);
 
        if (capacity > 1)
                seq_printf(m, "drm-engine-capacity-%s:\t%u\n",
This page took 0.047214 seconds and 4 git commands to generate.