From patchwork Thu Sep 18 14:58:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kuoppala X-Patchwork-Id: 4931221 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A90099F32F for ; Thu, 18 Sep 2014 14:57:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8AEC8201E4 for ; Thu, 18 Sep 2014 14:58:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2A2B620179 for ; Thu, 18 Sep 2014 14:58:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A3ADC6E6C4; Thu, 18 Sep 2014 07:58:04 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id D0A066E6C5 for ; Thu, 18 Sep 2014 07:58:03 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 18 Sep 2014 07:58:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,548,1406617200"; d="scan'208";a="601649939" Received: from rosetta.fi.intel.com (HELO rosetta) ([10.237.72.93]) by fmsmga002.fm.intel.com with ESMTP; 18 Sep 2014 07:58:02 -0700 Received: by rosetta (Postfix, from userid 1000) id 276C480085; Thu, 18 Sep 2014 17:58:42 +0300 (EEST) From: Mika Kuoppala To: intel-gfx@lists.freedesktop.org Date: Thu, 18 Sep 2014 17:58:35 +0300 Message-Id: <1411052315-22979-7-git-send-email-mika.kuoppala@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1411052315-22979-1-git-send-email-mika.kuoppala@intel.com> References: <1411052315-22979-1-git-send-email-mika.kuoppala@intel.com> Subject: [Intel-gfx] [PATCH 6/6] drm/i915: Check workaround status on dfs read time 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-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 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As the workaround list has the value as initialization time constant, we can do the simple checking on the go. For the user that doesn't have igt at hand and still server the igt's needs. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_debugfs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index c35c6ce..962c41e 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -2659,16 +2659,16 @@ static int i915_wa_registers(struct seq_file *m, void *unused) seq_printf(m, "Workarounds applied: %d\n", dev_priv->workarounds.count); for (i = 0; i < dev_priv->workarounds.count; ++i) { - u32 addr, mask; + u32 addr, mask, value, read; + bool ok; addr = dev_priv->workarounds.reg[i].addr; mask = dev_priv->workarounds.reg[i].mask; - dev_priv->workarounds.reg[i].value = I915_READ(addr) | mask; - if (dev_priv->workarounds.reg[i].addr) - seq_printf(m, "0x%X: 0x%08X, mask: 0x%08X\n", - dev_priv->workarounds.reg[i].addr, - dev_priv->workarounds.reg[i].value, - dev_priv->workarounds.reg[i].mask); + value = dev_priv->workarounds.reg[i].value; + read = I915_READ(addr); + ok = (value & mask) == (read & mask); + seq_printf(m, "0x%X: 0x%08X, mask: 0x%08X, read: 0x%08x, status: %s\n", + addr, value, mask, read, ok ? "OK" : "FAIL"); } gen6_gt_force_wake_put(dev_priv, FORCEWAKE_ALL);