diff --git a/src/intel/common/intel_batch_decoder.c b/src/intel/common/intel_batch_decoder.c index f7abd28397a..709e3c2374f 100644 --- a/src/intel/common/intel_batch_decoder.c +++ b/src/intel/common/intel_batch_decoder.c @@ -1289,8 +1289,9 @@ intel_print_batch(struct intel_batch_decode_ctx *ctx, reset_color = ""; } - fprintf(ctx->fp, "%s0x%08"PRIx64": 0x%08x: %-80s%s\n", - color, offset, p[0], inst_name, reset_color); + fprintf(ctx->fp, "%s0x%08"PRIx64"%s: 0x%08x: %-80s%s\n", color, offset, + ctx->acthd && offset == ctx->acthd ? " (ACTHD)" : "", p[0], + inst_name, reset_color); if (ctx->flags & INTEL_BATCH_DECODE_FULL) { ctx_print_group(ctx, inst, offset, p); diff --git a/src/intel/common/intel_decoder.h b/src/intel/common/intel_decoder.h index 2283a1d05c6..20458073a4e 100644 --- a/src/intel/common/intel_decoder.h +++ b/src/intel/common/intel_decoder.h @@ -252,6 +252,7 @@ struct intel_batch_decode_ctx { enum drm_i915_gem_engine_class engine; int n_batch_buffer_start; + uint64_t acthd; }; void intel_batch_decode_ctx_init(struct intel_batch_decode_ctx *ctx, diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c index eadeeb3af17..a10265c9b23 100644 --- a/src/intel/tools/aubinator_error_decode.c +++ b/src/intel/tools/aubinator_error_decode.c @@ -418,6 +418,7 @@ read_data_file(FILE *file) bool ring_wraps = false; char *ring_name = NULL; struct intel_device_info devinfo; + uint64_t acthd = 0; while (getline(&line, &line_size, file) > 0) { char *new_ring_name = NULL; @@ -538,6 +539,10 @@ read_data_file(FILE *file) ring_name), reg); } + matched = sscanf(line, " ACTHD: 0x%08x %08x\n", ®, ®2); + if (matched == 2) + acthd = ((uint64_t)reg << 32) | reg2; + matched = sscanf(line, " PGTBL_ER: 0x%08x\n", ®); if (matched == 1 && reg) print_pgtbl_err(reg, &devinfo); @@ -659,6 +664,7 @@ read_data_file(FILE *file) struct intel_batch_decode_ctx batch_ctx; intel_batch_decode_ctx_init(&batch_ctx, &devinfo, stdout, batch_flags, xml_path, get_intel_batch_bo, NULL, NULL); + batch_ctx.acthd = acthd; for (int s = 0; s < num_sections; s++) {