]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/i915: Skip logging impossible slices
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 21 Mar 2018 10:32:28 +0000 (10:32 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 23 Mar 2018 11:56:28 +0000 (11:56 +0000)
Log up to sseu->max_slices instead basing on ARRAY_SIZE since to avoid
printing impossible and empty slices for a platform.

Also compact slice total and slice mask into one log line.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180321103228.32205-1-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/intel_device_info.c

index a504281e2afaf023350973a7f3543b259b5939b7..0d1509e25db888b4a5dfa02795b7adbec7ddbbfa 100644 (file)
@@ -83,11 +83,11 @@ static void sseu_dump(const struct sseu_dev_info *sseu, struct drm_printer *p)
 {
        int s;
 
-       drm_printf(p, "slice mask: %04x\n", sseu->slice_mask);
-       drm_printf(p, "slice total: %u\n", hweight8(sseu->slice_mask));
+       drm_printf(p, "slice total: %u, mask=%04x\n",
+                  hweight8(sseu->slice_mask), sseu->slice_mask);
        drm_printf(p, "subslice total: %u\n", sseu_subslice_total(sseu));
-       for (s = 0; s < ARRAY_SIZE(sseu->subslice_mask); s++) {
-               drm_printf(p, "slice%d %u subslices mask=%04x\n",
+       for (s = 0; s < sseu->max_slices; s++) {
+               drm_printf(p, "slice%d: %u subslices, mask=%04x\n",
                           s, hweight8(sseu->subslice_mask[s]),
                           sseu->subslice_mask[s]);
        }