aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_perf.c
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2018-03-26 09:39:48 -0400
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2018-03-29 08:25:30 -0400
commit1de401c08fa805f3ac34604af1d43f48aeb17eb4 (patch)
treebaab1ea435a5fd6cf03f8e4f34fc1efdc8be4551 /drivers/gpu/drm/i915/i915_perf.c
parente770276079fd6e1088a255dee182a3c09a2d7aa9 (diff)
drm/i915/perf: enable perf support on ICL
No significant changes from either context offsets, nor report formats, nor register whitelist. v2: Also drop slice/unslice clock ratio changes (Matt) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180326133949.12469-3-lionel.g.landwerlin@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_perf.c')
-rw-r--r--drivers/gpu/drm/i915/i915_perf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index abaca6edeb71..30444bb3aaa1 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -209,6 +209,7 @@
209#include "i915_oa_cflgt2.h" 209#include "i915_oa_cflgt2.h"
210#include "i915_oa_cflgt3.h" 210#include "i915_oa_cflgt3.h"
211#include "i915_oa_cnl.h" 211#include "i915_oa_cnl.h"
212#include "i915_oa_icl.h"
212 213
213/* HW requires this to be a power of two, between 128k and 16M, though driver 214/* HW requires this to be a power of two, between 128k and 16M, though driver
214 * is currently generally designed assuming the largest 16M size is used such 215 * is currently generally designed assuming the largest 16M size is used such
@@ -1840,7 +1841,7 @@ static int gen8_enable_metric_set(struct drm_i915_private *dev_priv,
1840 * be read back from automatically triggered reports, as part of the 1841 * be read back from automatically triggered reports, as part of the
1841 * RPT_ID field. 1842 * RPT_ID field.
1842 */ 1843 */
1843 if (IS_GEN9(dev_priv) || IS_GEN10(dev_priv)) { 1844 if (IS_GEN(dev_priv, 9, 11)) {
1844 I915_WRITE(GEN8_OA_DEBUG, 1845 I915_WRITE(GEN8_OA_DEBUG,
1845 _MASKED_BIT_ENABLE(GEN9_OA_DEBUG_DISABLE_CLK_RATIO_REPORTS | 1846 _MASKED_BIT_ENABLE(GEN9_OA_DEBUG_DISABLE_CLK_RATIO_REPORTS |
1846 GEN9_OA_DEBUG_INCLUDE_CLK_RATIO)); 1847 GEN9_OA_DEBUG_INCLUDE_CLK_RATIO));
@@ -2935,6 +2936,8 @@ void i915_perf_register(struct drm_i915_private *dev_priv)
2935 i915_perf_load_test_config_cflgt3(dev_priv); 2936 i915_perf_load_test_config_cflgt3(dev_priv);
2936 } else if (IS_CANNONLAKE(dev_priv)) { 2937 } else if (IS_CANNONLAKE(dev_priv)) {
2937 i915_perf_load_test_config_cnl(dev_priv); 2938 i915_perf_load_test_config_cnl(dev_priv);
2939 } else if (IS_ICELAKE(dev_priv)) {
2940 i915_perf_load_test_config_icl(dev_priv);
2938 } 2941 }
2939 2942
2940 if (dev_priv->perf.oa.test_config.id == 0) 2943 if (dev_priv->perf.oa.test_config.id == 0)
@@ -3467,7 +3470,7 @@ void i915_perf_init(struct drm_i915_private *dev_priv)
3467 3470
3468 dev_priv->perf.oa.gen8_valid_ctx_bit = (1<<16); 3471 dev_priv->perf.oa.gen8_valid_ctx_bit = (1<<16);
3469 } 3472 }
3470 } else if (IS_GEN10(dev_priv)) { 3473 } else if (IS_GEN(dev_priv, 10, 11)) {
3471 dev_priv->perf.oa.ops.is_valid_b_counter_reg = 3474 dev_priv->perf.oa.ops.is_valid_b_counter_reg =
3472 gen7_is_valid_b_counter_addr; 3475 gen7_is_valid_b_counter_addr;
3473 dev_priv->perf.oa.ops.is_valid_mux_reg = 3476 dev_priv->perf.oa.ops.is_valid_mux_reg =