[Intel-gfx] [PATCH] drm/i915: Skip logging impossible slices
Chris Wilson
chris at chris-wilson.co.uk
Wed Mar 21 10:41:37 UTC 2018
Quoting Tvrtko Ursulin (2018-03-21 10:32:28)
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> 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 at intel.com>
> Cc: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
> drivers/gpu/drm/i915/intel_device_info.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index 4babfc6ee45b..68aa9746d0e1 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -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]);
Just idly testing the waters...
In yaml, this would be
"<indent>- slice%d: { subslices: %u, mask: 0x%04x }\n"
How do we feel about that in our debug output? And gradually use that
style by default? (I'm planning on converting the error state
wholesale...)
-chris
More information about the Intel-gfx
mailing list