From da2c7f35c7b3059e09b4ffe680975fac0d6eb7c0 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 23 Jun 2009 16:22:41 -0700 Subject: [PATCH] Correctly flag the acthd when it points within a packet. --- tools/intel_gpu_dump.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/intel_gpu_dump.c b/tools/intel_gpu_dump.c index c8b5cdd9..46aace41 100644 --- a/tools/intel_gpu_dump.c +++ b/tools/intel_gpu_dump.c @@ -82,15 +82,16 @@ instr_out(uint32_t *data, uint32_t hw_offset, unsigned int index, { va_list va; char *parseinfo; + uint32_t offset = hw_offset + index * 4; - if (hw_offset == head_offset) + if (offset == head_offset) parseinfo = "HEAD"; - else if (hw_offset == tail_offset) + else if (offset == tail_offset) parseinfo = "TAIL"; else parseinfo = " "; - fprintf(out, "0x%08x: %s 0x%08x: %s", hw_offset + index * 4, parseinfo, + fprintf(out, "0x%08x: %s 0x%08x: %s", offset + index * 4, parseinfo, data[index], index == 0 ? "" : " "); va_start(va, fmt);