From patchwork Fri Jul 28 17:10:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lionel Landwerlin X-Patchwork-Id: 9869167 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 B775A6038F for ; Fri, 28 Jul 2017 17:11:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92CCF288DE for ; Fri, 28 Jul 2017 17:11:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87BE5288E2; Fri, 28 Jul 2017 17:11:49 +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 D4D80288DE for ; Fri, 28 Jul 2017 17:11:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 410776F489; Fri, 28 Jul 2017 17:11:48 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 72DB96F489 for ; Fri, 28 Jul 2017 17:11:47 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 28 Jul 2017 10:11:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.40,425,1496127600"; d="scan'208"; a="1200318561" Received: from delly.ld.intel.com ([10.103.239.163]) by fmsmga002.fm.intel.com with ESMTP; 28 Jul 2017 10:11:36 -0700 From: Lionel Landwerlin To: intel-gfx@lists.freedesktop.org Date: Fri, 28 Jul 2017 18:10:23 +0100 Message-Id: <20170728171026.1749-4-lionel.g.landwerlin@intel.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170728171026.1749-1-lionel.g.landwerlin@intel.com> References: <20170728171026.1749-1-lionel.g.landwerlin@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v8 3/6] drm/i915/perf: leave GDT_CHICKEN_BITS programming in configs 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 There will be a need for userspaces configurations to set this register. We can apply the same model inside the kernel for test configs. Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/i915_oa_bdw.c | 2 ++ drivers/gpu/drm/i915/i915_oa_bxt.c | 1 + drivers/gpu/drm/i915/i915_oa_chv.c | 2 ++ drivers/gpu/drm/i915/i915_oa_glk.c | 1 + drivers/gpu/drm/i915/i915_oa_hsw.c | 1 + drivers/gpu/drm/i915/i915_oa_kblgt2.c | 1 + drivers/gpu/drm/i915/i915_oa_kblgt3.c | 1 + drivers/gpu/drm/i915/i915_oa_sklgt2.c | 1 + drivers/gpu/drm/i915/i915_oa_sklgt3.c | 1 + drivers/gpu/drm/i915/i915_oa_sklgt4.c | 1 + drivers/gpu/drm/i915/i915_perf.c | 7 ------- 11 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_oa_bdw.c b/drivers/gpu/drm/i915/i915_oa_bdw.c index 187067001179..abdf4d0abcce 100644 --- a/drivers/gpu/drm/i915/i915_oa_bdw.c +++ b/drivers/gpu/drm/i915/i915_oa_bdw.c @@ -60,6 +60,7 @@ static const struct i915_oa_reg flex_eu_config_test_oa[] = { }; static const struct i915_oa_reg mux_config_test_oa[] = { + { _MMIO(0x9840), 0x000000a0 }, { _MMIO(0x9888), 0x198b0000 }, { _MMIO(0x9888), 0x078b0066 }, { _MMIO(0x9888), 0x118b0000 }, @@ -72,6 +73,7 @@ static const struct i915_oa_reg mux_config_test_oa[] = { { _MMIO(0x9888), 0x4f800000 }, { _MMIO(0x9888), 0x41800000 }, { _MMIO(0x9888), 0x31800000 }, + { _MMIO(0x9840), 0x00000080 }, }; static ssize_t diff --git a/drivers/gpu/drm/i915/i915_oa_bxt.c b/drivers/gpu/drm/i915/i915_oa_bxt.c index d52074429def..b69b900de0fe 100644 --- a/drivers/gpu/drm/i915/i915_oa_bxt.c +++ b/drivers/gpu/drm/i915/i915_oa_bxt.c @@ -60,6 +60,7 @@ static const struct i915_oa_reg flex_eu_config_test_oa[] = { }; static const struct i915_oa_reg mux_config_test_oa[] = { + { _MMIO(0x9840), 0x00000080 }, { _MMIO(0x9888), 0x19800000 }, { _MMIO(0x9888), 0x07800063 }, { _MMIO(0x9888), 0x11800000 }, diff --git a/drivers/gpu/drm/i915/i915_oa_chv.c b/drivers/gpu/drm/i915/i915_oa_chv.c index b4832a0fefaa..322a3f94cd16 100644 --- a/drivers/gpu/drm/i915/i915_oa_chv.c +++ b/drivers/gpu/drm/i915/i915_oa_chv.c @@ -60,6 +60,7 @@ static const struct i915_oa_reg flex_eu_config_test_oa[] = { }; static const struct i915_oa_reg mux_config_test_oa[] = { + { _MMIO(0x9840), 0x000000a0 }, { _MMIO(0x9888), 0x59800000 }, { _MMIO(0x9888), 0x59800001 }, { _MMIO(0x9888), 0x338b0000 }, @@ -71,6 +72,7 @@ static const struct i915_oa_reg mux_config_test_oa[] = { { _MMIO(0x9888), 0x57800000 }, { _MMIO(0x1823a4), 0x00000000 }, { _MMIO(0x9888), 0x59800000 }, + { _MMIO(0x9840), 0x00000080 }, }; static ssize_t diff --git a/drivers/gpu/drm/i915/i915_oa_glk.c b/drivers/gpu/drm/i915/i915_oa_glk.c index f0dbab5d19e0..4ee527e4c926 100644 --- a/drivers/gpu/drm/i915/i915_oa_glk.c +++ b/drivers/gpu/drm/i915/i915_oa_glk.c @@ -60,6 +60,7 @@ static const struct i915_oa_reg flex_eu_config_test_oa[] = { }; static const struct i915_oa_reg mux_config_test_oa[] = { + { _MMIO(0x9840), 0x00000080 }, { _MMIO(0x9888), 0x19800000 }, { _MMIO(0x9888), 0x07800063 }, { _MMIO(0x9888), 0x11800000 }, diff --git a/drivers/gpu/drm/i915/i915_oa_hsw.c b/drivers/gpu/drm/i915/i915_oa_hsw.c index 867ec16dd831..56b03773bb9d 100644 --- a/drivers/gpu/drm/i915/i915_oa_hsw.c +++ b/drivers/gpu/drm/i915/i915_oa_hsw.c @@ -42,6 +42,7 @@ static const struct i915_oa_reg flex_eu_config_render_basic[] = { }; static const struct i915_oa_reg mux_config_render_basic[] = { + { _MMIO(0x9840), 0x00000080 }, { _MMIO(0x253a4), 0x01600000 }, { _MMIO(0x25440), 0x00100000 }, { _MMIO(0x25128), 0x00000000 }, diff --git a/drivers/gpu/drm/i915/i915_oa_kblgt2.c b/drivers/gpu/drm/i915/i915_oa_kblgt2.c index 2e8700c74227..b6e7cc774136 100644 --- a/drivers/gpu/drm/i915/i915_oa_kblgt2.c +++ b/drivers/gpu/drm/i915/i915_oa_kblgt2.c @@ -60,6 +60,7 @@ static const struct i915_oa_reg flex_eu_config_test_oa[] = { }; static const struct i915_oa_reg mux_config_test_oa[] = { + { _MMIO(0x9840), 0x00000080 }, { _MMIO(0x9888), 0x11810000 }, { _MMIO(0x9888), 0x07810013 }, { _MMIO(0x9888), 0x1f810000 }, diff --git a/drivers/gpu/drm/i915/i915_oa_kblgt3.c b/drivers/gpu/drm/i915/i915_oa_kblgt3.c index ea524e024c72..5576afdd9a7e 100644 --- a/drivers/gpu/drm/i915/i915_oa_kblgt3.c +++ b/drivers/gpu/drm/i915/i915_oa_kblgt3.c @@ -60,6 +60,7 @@ static const struct i915_oa_reg flex_eu_config_test_oa[] = { }; static const struct i915_oa_reg mux_config_test_oa[] = { + { _MMIO(0x9840), 0x00000080 }, { _MMIO(0x9888), 0x11810000 }, { _MMIO(0x9888), 0x07810013 }, { _MMIO(0x9888), 0x1f810000 }, diff --git a/drivers/gpu/drm/i915/i915_oa_sklgt2.c b/drivers/gpu/drm/i915/i915_oa_sklgt2.c index 93267e55f190..890d55879946 100644 --- a/drivers/gpu/drm/i915/i915_oa_sklgt2.c +++ b/drivers/gpu/drm/i915/i915_oa_sklgt2.c @@ -59,6 +59,7 @@ static const struct i915_oa_reg flex_eu_config_test_oa[] = { }; static const struct i915_oa_reg mux_config_test_oa[] = { + { _MMIO(0x9840), 0x00000080 }, { _MMIO(0x9888), 0x11810000 }, { _MMIO(0x9888), 0x07810016 }, { _MMIO(0x9888), 0x1f810000 }, diff --git a/drivers/gpu/drm/i915/i915_oa_sklgt3.c b/drivers/gpu/drm/i915/i915_oa_sklgt3.c index 2e342b4bc3a5..85e51addf86a 100644 --- a/drivers/gpu/drm/i915/i915_oa_sklgt3.c +++ b/drivers/gpu/drm/i915/i915_oa_sklgt3.c @@ -60,6 +60,7 @@ static const struct i915_oa_reg flex_eu_config_test_oa[] = { }; static const struct i915_oa_reg mux_config_test_oa[] = { + { _MMIO(0x9840), 0x00000080 }, { _MMIO(0x9888), 0x11810000 }, { _MMIO(0x9888), 0x07810013 }, { _MMIO(0x9888), 0x1f810000 }, diff --git a/drivers/gpu/drm/i915/i915_oa_sklgt4.c b/drivers/gpu/drm/i915/i915_oa_sklgt4.c index f933f497c15a..bce031ee4445 100644 --- a/drivers/gpu/drm/i915/i915_oa_sklgt4.c +++ b/drivers/gpu/drm/i915/i915_oa_sklgt4.c @@ -60,6 +60,7 @@ static const struct i915_oa_reg flex_eu_config_test_oa[] = { }; static const struct i915_oa_reg mux_config_test_oa[] = { + { _MMIO(0x9840), 0x00000080 }, { _MMIO(0x9888), 0x11810000 }, { _MMIO(0x9888), 0x07810013 }, { _MMIO(0x9888), 0x1f810000 }, diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index 07d53b10a258..ad84260de949 100644 --- a/drivers/gpu/drm/i915/i915_perf.c +++ b/drivers/gpu/drm/i915/i915_perf.c @@ -1456,9 +1456,6 @@ static void config_oa_regs(struct drm_i915_private *dev_priv, static int hsw_enable_metric_set(struct drm_i915_private *dev_priv, const struct i915_oa_config *oa_config) { - I915_WRITE(GDT_CHICKEN_BITS, (I915_READ(GDT_CHICKEN_BITS) | - GT_NOA_ENABLE)); - /* PRM: * * OA unit is using “crclk” for its functionality. When trunk @@ -1818,12 +1815,8 @@ static int gen8_enable_metric_set(struct drm_i915_private *dev_priv, if (ret) return ret; - I915_WRITE(GDT_CHICKEN_BITS, 0xA0); - config_oa_regs(dev_priv, oa_config->mux_regs, oa_config->mux_regs_len); - I915_WRITE(GDT_CHICKEN_BITS, 0x80); - config_oa_regs(dev_priv, oa_config->b_counter_regs, oa_config->b_counter_regs_len);