From patchwork Fri Aug 5 08:39:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 9264919 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3967360839 for ; Fri, 5 Aug 2016 08:39:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C4DE283E6 for ; Fri, 5 Aug 2016 08:39:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2099728422; Fri, 5 Aug 2016 08:39:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D5746283E6 for ; Fri, 5 Aug 2016 08:39:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 323126EB07; Fri, 5 Aug 2016 08:39:37 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 482116EB07 for ; Fri, 5 Aug 2016 08:39:36 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 05 Aug 2016 01:39:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.28,473,1464678000"; d="scan'208"; a="1008909333" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga001.jf.intel.com with SMTP; 05 Aug 2016 01:39:33 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 05 Aug 2016 11:39:32 +0300 From: ville.syrjala@linux.intel.com To: intel-gfx@lists.freedesktop.org Date: Fri, 5 Aug 2016 11:39:28 +0300 Message-Id: <1470386369-4361-2-git-send-email-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470386369-4361-1-git-send-email-ville.syrjala@linux.intel.com> References: <1470386369-4361-1-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t 2/3] tools/intel_reg: Dump fence registers on ILK X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Ville Syrjälä Currently ILK doesn't get its fences dumped. Let's fix that. Signed-off-by: Ville Syrjälä --- tools/intel_reg_decode.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/intel_reg_decode.c b/tools/intel_reg_decode.c index 0dbabe81ca3d..2d79290a4b58 100644 --- a/tools/intel_reg_decode.c +++ b/tools/intel_reg_decode.c @@ -743,7 +743,7 @@ DEBUGSTRING(i810_debug_965_fence_start) int pitch = ((val & 0xffc) >> 2) * 128 + 128; unsigned int offset = val & 0xfffff000; - if (!IS_GEN4(devid)) + if (!IS_GEN4(devid) && !IS_GEN5(devid)) return 0; return z_snprintf(result, len, "%s, %c tile walk, %4d pitch, 0x%08x start", @@ -1012,6 +1012,10 @@ static const struct reg_debug intel_debug_regs[] = { DEFINEFENCE_945(14), DEFINEFENCE_945(15), + DEFINEREG(INST_PM), +}; + +static const struct reg_debug i965_fences[] = { #define DEFINEFENCE_965(i) \ { FENCE_NEW+i*8, "FENCE START " #i, i810_debug_965_fence_start }, \ { FENCE_NEW+i*8+4, "FENCE END " #i, i810_debug_965_fence_end } @@ -1032,8 +1036,6 @@ static const struct reg_debug intel_debug_regs[] = { DEFINEFENCE_965(13), DEFINEFENCE_965(14), DEFINEFENCE_965(15), - - DEFINEREG(INST_PM), }; DEBUGSTRING(ironlake_debug_rr_hw_ctl) @@ -2594,6 +2596,11 @@ static bool is_gen56ivb(uint32_t devid, uint32_t pch) return IS_GEN5(devid) || IS_GEN6(devid) || IS_IVYBRIDGE(devid); } +static bool is_gen45(uint32_t devid, uint32_t pch) +{ + return IS_GEN4(devid) || IS_GEN5(devid); +} + static bool is_945gm(uint32_t devid, uint32_t pch) { return IS_945GM(devid); @@ -2614,6 +2621,7 @@ static struct { } known_registers[] = { DECLARE_REGS("Gen2", intel_debug_regs, is_gen234), DECLARE_REGS("i945GM", i945gm_mi_regs, is_945gm), + DECLARE_REGS("Gen4", i965_fences, is_gen45), DECLARE_REGS("Gen5", ironlake_debug_regs, is_gen56ivb), DECLARE_REGS("Gen6", gen6_rp_debug_regs, is_gen6_plus), DECLARE_REGS("Gen6+", gen6_fences, is_gen6_plus),