Commit 3f488d99 authored by Lionel Landwerlin's avatar Lionel Landwerlin Committed by Ben Widawsky

drm/i915/perf: rework mux configurations queries

Gen8+ might have mux configurations per slices/subslices. Depending on
whether slices/subslices have been fused off, only part of the
configuration needs to be applied. This change reworks the mux
configurations query mechanism to allow more than one set of registers
to be programmed.

v2: s/n_mux_regs/n_mux_configs/ (Matthew)
Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
parent f5320233
...@@ -2417,8 +2417,10 @@ struct drm_i915_private { ...@@ -2417,8 +2417,10 @@ struct drm_i915_private {
int metrics_set; int metrics_set;
const struct i915_oa_reg *mux_regs; const struct i915_oa_reg *mux_regs[1];
int mux_regs_len; int mux_regs_lens[1];
int n_mux_configs;
const struct i915_oa_reg *b_counter_regs; const struct i915_oa_reg *b_counter_regs;
int b_counter_regs_len; int b_counter_regs_len;
......
This diff is collapsed.
/* /*
* Autogenerated file, DO NOT EDIT manually! * Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*
* *
* Copyright (c) 2015 Intel Corporation * Copyright (c) 2015 Intel Corporation
* *
......
...@@ -1047,6 +1047,7 @@ static void config_oa_regs(struct drm_i915_private *dev_priv, ...@@ -1047,6 +1047,7 @@ static void config_oa_regs(struct drm_i915_private *dev_priv,
static int hsw_enable_metric_set(struct drm_i915_private *dev_priv) static int hsw_enable_metric_set(struct drm_i915_private *dev_priv)
{ {
int ret = i915_oa_select_metric_set_hsw(dev_priv); int ret = i915_oa_select_metric_set_hsw(dev_priv);
int i;
if (ret) if (ret)
return ret; return ret;
...@@ -1068,8 +1069,10 @@ static int hsw_enable_metric_set(struct drm_i915_private *dev_priv) ...@@ -1068,8 +1069,10 @@ static int hsw_enable_metric_set(struct drm_i915_private *dev_priv)
I915_WRITE(GEN6_UCGCTL1, (I915_READ(GEN6_UCGCTL1) | I915_WRITE(GEN6_UCGCTL1, (I915_READ(GEN6_UCGCTL1) |
GEN6_CSUNIT_CLOCK_GATE_DISABLE)); GEN6_CSUNIT_CLOCK_GATE_DISABLE));
config_oa_regs(dev_priv, dev_priv->perf.oa.mux_regs, for (i = 0; i < dev_priv->perf.oa.n_mux_configs; i++) {
dev_priv->perf.oa.mux_regs_len); config_oa_regs(dev_priv, dev_priv->perf.oa.mux_regs[i],
dev_priv->perf.oa.mux_regs_lens[i]);
}
/* It apparently takes a fairly long time for a new MUX /* It apparently takes a fairly long time for a new MUX
* configuration to be be applied after these register writes. * configuration to be be applied after these register writes.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment