public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Michel Thierry <michel.thierry@intel.com>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] tools/intel_error_decode: Add decodings for FAULT_REG
Date: Wed, 25 Mar 2015 16:46:32 +0000	[thread overview]
Message-ID: <5512E668.1040806@intel.com> (raw)
In-Reply-To: <1427300025-27007-1-git-send-email-mika.kuoppala@intel.com>

On 3/25/2015 4:13 PM, Mika Kuoppala wrote:
> Add decodings for FAULT_REG
>
> v2: fix fault encodings and ignore addr type for gen8+ (Michel)
>      fix engine mask
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
>   tools/intel_error_decode.c | 42 ++++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 42 insertions(+)
>
> diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c
> index fb4a2a4..5fccefa 100644
> --- a/tools/intel_error_decode.c
> +++ b/tools/intel_error_decode.c
> @@ -380,6 +380,44 @@ print_fence(unsigned int devid, uint64_t fence)
>          }
>   }
>
> +static void
> +print_fault_reg(unsigned devid, uint32_t reg)
> +{
> +       const char *gen7_types[] = { "Page",
> +                                    "Invalid PD",
> +                                    "Unloaded PD",
> +                                    "Invalid and Unloaded PD" };
> +
> +       const char *gen8_types[] = { "PTE",
> +                                    "PDE",
> +                                    "PDPE",
> +                                    "PML4E" };
> +
> +       const char *engine[] = { "GFX", "MFX0", "MFX1", "VEBX",
> +                                "BLT", "Unknown", "Unknown", "Unknown" };
> +
> +       if (intel_gen(devid) < 7)
> +               return;
> +
> +       if (reg & (1 << 0))
> +               printf("    Valid\n");
> +       else
> +               return;
> +
> +       if (intel_gen(devid) < 8)
> +               printf("    %s Fault (%s)\n", gen7_types[reg >> 1 & 0x3],
> +                      reg & (1 << 11) ? "GGTT" : "PPGTT");
> +       else
> +               printf("    Invalid %s Fault\n", gen8_types[reg >> 1 & 0x3]);
> +
> +       if (intel_gen(devid) < 8)
> +               printf("    Address 0x%08x\n", reg & ~((1 << 12)-1));
> +       else
> +               printf("    Engine %s\n", engine[reg >> 12 & 0x7]);
> +
> +       printf("    Source ID %d\n", reg >> 3 & 0xff);
> +}
> +
>   #define MAX_RINGS 10 /* I really hope this never... */
>   uint32_t head[MAX_RINGS];
>   int head_ndx = 0;
> @@ -520,6 +558,10 @@ read_data_file(FILE *file)
>                          if (matched == 2)
>                                  print_fence(devid, fence);
>
> +                       matched = sscanf(line, "  FAULT_REG: 0x%08x\n", &reg);
> +                       if (matched == 1 && reg)
> +                               print_fault_reg(devid, reg);
> +
>                          continue;
>                  }
>
> --
> 1.9.1
>

v2 looks good.

Reviewed-by: Michel Thierry <michel.thierry@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-03-25 16:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 13:42 [PATCH 1/3] tools/intel_error_decode: Add ERROR decodings for gen8 Mika Kuoppala
2015-03-25 13:42 ` [PATCH 2/3] tools/intel_error_decode: Add decodings for FAULT_REG Mika Kuoppala
2015-03-25 16:13   ` Mika Kuoppala
2015-03-25 16:46     ` Michel Thierry [this message]
2015-03-25 13:42 ` [PATCH 3/3] tools/intel_error_decode: Add gen8+ fault data encodings Mika Kuoppala
2015-03-25 16:47   ` Michel Thierry
2015-03-25 16:46 ` [PATCH 1/3] tools/intel_error_decode: Add ERROR decodings for gen8 Michel Thierry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5512E668.1040806@intel.com \
    --to=michel.thierry@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox