Commit fc599211 authored by Robert Bragg's avatar Robert Bragg Committed by Ben Widawsky

drm/i915/perf: Add more OA configs for BDW, CHV, SKL + BXT

These are auto generated from an XML description of metric sets,
currently maintained in gputop, ref:

 https://github.com/rib/gputop
 > gputop-data/oa-*.xml
 > scripts/i915-perf-kernelgen.py

 $ make -C gputop-data -f Makefile.xml
Signed-off-by: default avatarRobert Bragg <robert@sixbynine.org>
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 19f81df2
...@@ -2418,8 +2418,8 @@ struct drm_i915_private { ...@@ -2418,8 +2418,8 @@ struct drm_i915_private {
int metrics_set; int metrics_set;
const struct i915_oa_reg *mux_regs[2]; const struct i915_oa_reg *mux_regs[6];
int mux_regs_lens[2]; int mux_regs_lens[6];
int n_mux_configs; int n_mux_configs;
const struct i915_oa_reg *b_counter_regs; const struct i915_oa_reg *b_counter_regs;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -49,6 +49,9 @@ static const struct i915_oa_reg b_counter_config_render_basic[] = { ...@@ -49,6 +49,9 @@ static const struct i915_oa_reg b_counter_config_render_basic[] = {
{ _MMIO(0x2710), 0x00000000 }, { _MMIO(0x2710), 0x00000000 },
}; };
static const struct i915_oa_reg flex_eu_config_render_basic[] = {
};
static const struct i915_oa_reg mux_config_render_basic[] = { static const struct i915_oa_reg mux_config_render_basic[] = {
{ _MMIO(0x253a4), 0x01600000 }, { _MMIO(0x253a4), 0x01600000 },
{ _MMIO(0x25440), 0x00100000 }, { _MMIO(0x25440), 0x00100000 },
...@@ -148,6 +151,9 @@ static const struct i915_oa_reg b_counter_config_compute_basic[] = { ...@@ -148,6 +151,9 @@ static const struct i915_oa_reg b_counter_config_compute_basic[] = {
{ _MMIO(0x236c), 0x00000000 }, { _MMIO(0x236c), 0x00000000 },
}; };
static const struct i915_oa_reg flex_eu_config_compute_basic[] = {
};
static const struct i915_oa_reg mux_config_compute_basic[] = { static const struct i915_oa_reg mux_config_compute_basic[] = {
{ _MMIO(0x253a4), 0x00000000 }, { _MMIO(0x253a4), 0x00000000 },
{ _MMIO(0x2681c), 0x01f00800 }, { _MMIO(0x2681c), 0x01f00800 },
...@@ -223,6 +229,9 @@ static const struct i915_oa_reg b_counter_config_compute_extended[] = { ...@@ -223,6 +229,9 @@ static const struct i915_oa_reg b_counter_config_compute_extended[] = {
{ _MMIO(0x27ac), 0x0000fffe }, { _MMIO(0x27ac), 0x0000fffe },
}; };
static const struct i915_oa_reg flex_eu_config_compute_extended[] = {
};
static const struct i915_oa_reg mux_config_compute_extended[] = { static const struct i915_oa_reg mux_config_compute_extended[] = {
{ _MMIO(0x2681c), 0x3eb00800 }, { _MMIO(0x2681c), 0x3eb00800 },
{ _MMIO(0x26820), 0x00900000 }, { _MMIO(0x26820), 0x00900000 },
...@@ -289,6 +298,9 @@ static const struct i915_oa_reg b_counter_config_memory_reads[] = { ...@@ -289,6 +298,9 @@ static const struct i915_oa_reg b_counter_config_memory_reads[] = {
{ _MMIO(0x27ac), 0x0000fc00 }, { _MMIO(0x27ac), 0x0000fc00 },
}; };
static const struct i915_oa_reg flex_eu_config_memory_reads[] = {
};
static const struct i915_oa_reg mux_config_memory_reads[] = { static const struct i915_oa_reg mux_config_memory_reads[] = {
{ _MMIO(0x253a4), 0x34300000 }, { _MMIO(0x253a4), 0x34300000 },
{ _MMIO(0x25440), 0x2d800000 }, { _MMIO(0x25440), 0x2d800000 },
...@@ -358,6 +370,9 @@ static const struct i915_oa_reg b_counter_config_memory_writes[] = { ...@@ -358,6 +370,9 @@ static const struct i915_oa_reg b_counter_config_memory_writes[] = {
{ _MMIO(0x27ac), 0x0000fc00 }, { _MMIO(0x27ac), 0x0000fc00 },
}; };
static const struct i915_oa_reg flex_eu_config_memory_writes[] = {
};
static const struct i915_oa_reg mux_config_memory_writes[] = { static const struct i915_oa_reg mux_config_memory_writes[] = {
{ _MMIO(0x253a4), 0x34300000 }, { _MMIO(0x253a4), 0x34300000 },
{ _MMIO(0x25440), 0x01500000 }, { _MMIO(0x25440), 0x01500000 },
...@@ -405,6 +420,9 @@ static const struct i915_oa_reg b_counter_config_sampler_balance[] = { ...@@ -405,6 +420,9 @@ static const struct i915_oa_reg b_counter_config_sampler_balance[] = {
{ _MMIO(0x2724), 0x00800000 }, { _MMIO(0x2724), 0x00800000 },
}; };
static const struct i915_oa_reg flex_eu_config_sampler_balance[] = {
};
static const struct i915_oa_reg mux_config_sampler_balance[] = { static const struct i915_oa_reg mux_config_sampler_balance[] = {
{ _MMIO(0x2eb9c), 0x01906400 }, { _MMIO(0x2eb9c), 0x01906400 },
{ _MMIO(0x2fb9c), 0x01906400 }, { _MMIO(0x2fb9c), 0x01906400 },
...@@ -492,6 +510,11 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv) ...@@ -492,6 +510,11 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv)
dev_priv->perf.oa.b_counter_regs_len = dev_priv->perf.oa.b_counter_regs_len =
ARRAY_SIZE(b_counter_config_render_basic); ARRAY_SIZE(b_counter_config_render_basic);
dev_priv->perf.oa.flex_regs =
flex_eu_config_render_basic;
dev_priv->perf.oa.flex_regs_len =
ARRAY_SIZE(flex_eu_config_render_basic);
return 0; return 0;
case METRIC_SET_ID_COMPUTE_BASIC: case METRIC_SET_ID_COMPUTE_BASIC:
dev_priv->perf.oa.n_mux_configs = dev_priv->perf.oa.n_mux_configs =
...@@ -513,6 +536,11 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv) ...@@ -513,6 +536,11 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv)
dev_priv->perf.oa.b_counter_regs_len = dev_priv->perf.oa.b_counter_regs_len =
ARRAY_SIZE(b_counter_config_compute_basic); ARRAY_SIZE(b_counter_config_compute_basic);
dev_priv->perf.oa.flex_regs =
flex_eu_config_compute_basic;
dev_priv->perf.oa.flex_regs_len =
ARRAY_SIZE(flex_eu_config_compute_basic);
return 0; return 0;
case METRIC_SET_ID_COMPUTE_EXTENDED: case METRIC_SET_ID_COMPUTE_EXTENDED:
dev_priv->perf.oa.n_mux_configs = dev_priv->perf.oa.n_mux_configs =
...@@ -534,6 +562,11 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv) ...@@ -534,6 +562,11 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv)
dev_priv->perf.oa.b_counter_regs_len = dev_priv->perf.oa.b_counter_regs_len =
ARRAY_SIZE(b_counter_config_compute_extended); ARRAY_SIZE(b_counter_config_compute_extended);
dev_priv->perf.oa.flex_regs =
flex_eu_config_compute_extended;
dev_priv->perf.oa.flex_regs_len =
ARRAY_SIZE(flex_eu_config_compute_extended);
return 0; return 0;
case METRIC_SET_ID_MEMORY_READS: case METRIC_SET_ID_MEMORY_READS:
dev_priv->perf.oa.n_mux_configs = dev_priv->perf.oa.n_mux_configs =
...@@ -555,6 +588,11 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv) ...@@ -555,6 +588,11 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv)
dev_priv->perf.oa.b_counter_regs_len = dev_priv->perf.oa.b_counter_regs_len =
ARRAY_SIZE(b_counter_config_memory_reads); ARRAY_SIZE(b_counter_config_memory_reads);
dev_priv->perf.oa.flex_regs =
flex_eu_config_memory_reads;
dev_priv->perf.oa.flex_regs_len =
ARRAY_SIZE(flex_eu_config_memory_reads);
return 0; return 0;
case METRIC_SET_ID_MEMORY_WRITES: case METRIC_SET_ID_MEMORY_WRITES:
dev_priv->perf.oa.n_mux_configs = dev_priv->perf.oa.n_mux_configs =
...@@ -576,6 +614,11 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv) ...@@ -576,6 +614,11 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv)
dev_priv->perf.oa.b_counter_regs_len = dev_priv->perf.oa.b_counter_regs_len =
ARRAY_SIZE(b_counter_config_memory_writes); ARRAY_SIZE(b_counter_config_memory_writes);
dev_priv->perf.oa.flex_regs =
flex_eu_config_memory_writes;
dev_priv->perf.oa.flex_regs_len =
ARRAY_SIZE(flex_eu_config_memory_writes);
return 0; return 0;
case METRIC_SET_ID_SAMPLER_BALANCE: case METRIC_SET_ID_SAMPLER_BALANCE:
dev_priv->perf.oa.n_mux_configs = dev_priv->perf.oa.n_mux_configs =
...@@ -597,6 +640,11 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv) ...@@ -597,6 +640,11 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv)
dev_priv->perf.oa.b_counter_regs_len = dev_priv->perf.oa.b_counter_regs_len =
ARRAY_SIZE(b_counter_config_sampler_balance); ARRAY_SIZE(b_counter_config_sampler_balance);
dev_priv->perf.oa.flex_regs =
flex_eu_config_sampler_balance;
dev_priv->perf.oa.flex_regs_len =
ARRAY_SIZE(flex_eu_config_sampler_balance);
return 0; return 0;
default: default:
return -ENODEV; return -ENODEV;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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