From patchwork Tue Apr 29 01:45:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 4084141 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 67D07BFF02 for ; Tue, 29 Apr 2014 01:46:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 639F6201F5 for ; Tue, 29 Apr 2014 01:46:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 899F3201DE for ; Tue, 29 Apr 2014 01:46:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A66D76E5F4; Mon, 28 Apr 2014 18:46:05 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail.bwidawsk.net (bwidawsk.net [166.78.191.112]) by gabe.freedesktop.org (Postfix) with ESMTP id EDA876E5F4 for ; Mon, 28 Apr 2014 18:46:04 -0700 (PDT) Received: by mail.bwidawsk.net (Postfix, from userid 5001) id 8210E58004; Mon, 28 Apr 2014 18:46:02 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from ironside.kumite (c-24-21-100-90.hsd1.or.comcast.net [24.21.100.90]) by mail.bwidawsk.net (Postfix) with ESMTPSA id 2446E58002 for ; Mon, 28 Apr 2014 18:45:55 -0700 (PDT) From: Ben Widawsky To: Intel GFX Date: Mon, 28 Apr 2014 18:45:50 -0700 Message-Id: <1398735950-23760-1-git-send-email-benjamin.widawsky@intel.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1398735784-7069-1-git-send-email-benjamin.widawsky@intel.com> References: <1398735784-7069-1-git-send-email-benjamin.widawsky@intel.com> Subject: [Intel-gfx] [PATCH] intel_error_decode: use 64b gtt_offset X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP See the relevant kernel patch for the details. I guess this breaks support for older error state, I am not actually sure. Without versioning our error state though, I cannot think of a better way. Suggestions are welcome. Signed-off-by: Ben Widawsky --- tools/intel_error_decode.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c index 1eeff07..d0028a1 100644 --- a/tools/intel_error_decode.c +++ b/tools/intel_error_decode.c @@ -311,17 +311,17 @@ print_fence(unsigned int devid, uint64_t fence) uint32_t head[MAX_RINGS]; int head_ndx = 0; int num_rings = 0; -static void print_batch(int is_batch, const char *ring_name, uint32_t gtt_offset) +static void print_batch(int is_batch, const char *ring_name, uint64_t gtt_offset) { const char *buffer_type[2] = { "ringbuffer", "batchbuffer" }; if (is_batch || !num_rings) - printf("%s (%s) at 0x%08x\n", buffer_type[is_batch], ring_name, gtt_offset); + printf("%s (%s) at 0x%016lx\n", buffer_type[is_batch], ring_name, gtt_offset); else - printf("%s (%s) at 0x%08x; HEAD points to: 0x%08x\n", buffer_type[is_batch], ring_name, gtt_offset, head[head_ndx++ % num_rings] + gtt_offset); + printf("%s (%s) at 0x%016lx; HEAD points to: 0x%016lx\n", buffer_type[is_batch], ring_name, gtt_offset, head[head_ndx++ % num_rings] + gtt_offset); } static void decode(struct drm_intel_decode *ctx, bool is_batch, - const char *ring_name, uint32_t gtt_offset, uint32_t *data, + const char *ring_name, uint64_t gtt_offset, uint32_t *data, int *count) { if (!*count) @@ -344,7 +344,7 @@ read_data_file(FILE *file) char *line = NULL; size_t line_size; uint32_t offset, value, ring_length = 0; - uint32_t gtt_offset = 0, new_gtt_offset; + uint64_t gtt_offset = 0, new_gtt_offset; char *ring_name = NULL; int is_batch = 1; @@ -361,7 +361,7 @@ read_data_file(FILE *file) if (num_rings == -1) num_rings = head_ndx; - matched = sscanf(dashes, "--- gtt_offset = 0x%08x\n", + matched = sscanf(dashes, "--- gtt_offset = 0x%016lx\n", &new_gtt_offset); if (matched == 1) { decode(decode_ctx, is_batch, ring_name, @@ -373,7 +373,7 @@ read_data_file(FILE *file) continue; } - matched = sscanf(dashes, "--- ringbuffer = 0x%08x\n", + matched = sscanf(dashes, "--- ringbuffer = 0x%08lx\n", &new_gtt_offset); if (matched == 1) { decode(decode_ctx, is_batch, ring_name,