From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> To: igt-dev@lists.freedesktop.org Cc: Intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH i-g-t] intel_error_decode: Handle no decoding context Date: Wed, 18 Nov 2020 16:38:09 +0000 [thread overview] Message-ID: <20201118163809.959127-1-tvrtko.ursulin@linux.intel.com> (raw) From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> If decoding context couldn't be created, say the local libdrm does not support the GPU which created the error state, it is much more handy to at least decode and dump metadata and rings. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> --- tools/intel_error_decode.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c index 356ce37274f9..90a18a07ba17 100644 --- a/tools/intel_error_decode.c +++ b/tools/intel_error_decode.c @@ -465,7 +465,7 @@ static void decode(struct drm_intel_decode *ctx, (unsigned)((head_offset + gtt_offset) & 0xffffffff)); printf("\n"); - if (decode) { + if (decode && ctx) { drm_intel_decode_set_batch_pointer(ctx, data, gtt_offset, *count); drm_intel_decode(ctx); @@ -707,7 +707,10 @@ read_data_file(FILE *file) matched = sscanf(line, " ACTHD: 0x%08x\n", ®); if (matched == 1) { print_acthd(reg, ring_length); - drm_intel_decode_set_head_tail(decode_ctx, reg, 0xffffffff); + if (decode_ctx) + drm_intel_decode_set_head_tail(decode_ctx, + reg, + 0xffffffff); } matched = sscanf(line, " PGTBL_ER: 0x%08x\n", ®); -- 2.25.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> To: igt-dev@lists.freedesktop.org Cc: Intel-gfx@lists.freedesktop.org, Tvrtko Ursulin <tvrtko.ursulin@intel.com> Subject: [igt-dev] [PATCH i-g-t] intel_error_decode: Handle no decoding context Date: Wed, 18 Nov 2020 16:38:09 +0000 [thread overview] Message-ID: <20201118163809.959127-1-tvrtko.ursulin@linux.intel.com> (raw) From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> If decoding context couldn't be created, say the local libdrm does not support the GPU which created the error state, it is much more handy to at least decode and dump metadata and rings. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> --- tools/intel_error_decode.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c index 356ce37274f9..90a18a07ba17 100644 --- a/tools/intel_error_decode.c +++ b/tools/intel_error_decode.c @@ -465,7 +465,7 @@ static void decode(struct drm_intel_decode *ctx, (unsigned)((head_offset + gtt_offset) & 0xffffffff)); printf("\n"); - if (decode) { + if (decode && ctx) { drm_intel_decode_set_batch_pointer(ctx, data, gtt_offset, *count); drm_intel_decode(ctx); @@ -707,7 +707,10 @@ read_data_file(FILE *file) matched = sscanf(line, " ACTHD: 0x%08x\n", ®); if (matched == 1) { print_acthd(reg, ring_length); - drm_intel_decode_set_head_tail(decode_ctx, reg, 0xffffffff); + if (decode_ctx) + drm_intel_decode_set_head_tail(decode_ctx, + reg, + 0xffffffff); } matched = sscanf(line, " PGTBL_ER: 0x%08x\n", ®); -- 2.25.1 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2020-11-18 16:38 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-18 16:38 Tvrtko Ursulin [this message] 2020-11-18 16:38 ` [igt-dev] [PATCH i-g-t] intel_error_decode: Handle no decoding context Tvrtko Ursulin 2020-11-18 17:05 ` [Intel-gfx] " Chris Wilson 2020-11-18 17:05 ` Chris Wilson 2020-11-18 18:05 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork 2020-11-19 3:50 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=20201118163809.959127-1-tvrtko.ursulin@linux.intel.com \ --to=tvrtko.ursulin@linux.intel.com \ --cc=Intel-gfx@lists.freedesktop.org \ --cc=igt-dev@lists.freedesktop.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.