[Intel-gfx] [PATCH 6/6] drm/i915: Add more OA configs for BDW, CHV, SKL + BXT

Matthew Auld matthew.william.auld at gmail.com
Wed Mar 1 13:00:31 UTC 2017


On 02/22, Robert Bragg wrote:
> 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: Robert Bragg <robert at sixbynine.org>
> ---

<SNIP>

> +
> +static const struct i915_oa_reg *
> +get_compute_extended_mux_config(struct drm_i915_private *dev_priv,
> +				int *len)
> +{
> +	if (INTEL_INFO(dev_priv)->sseu.subslice_mask & 0x01) {
> +		*len = ARRAY_SIZE(mux_config_compute_extended_1_0_subslices_0x01);
> +		return mux_config_compute_extended_1_0_subslices_0x01;
> +	} else if (INTEL_INFO(dev_priv)->sseu.subslice_mask & 0x08) {
> +		*len = ARRAY_SIZE(mux_config_compute_extended_1_1_subslices_0x08);
> +		return mux_config_compute_extended_1_1_subslices_0x08;
> +	} else if (INTEL_INFO(dev_priv)->sseu.subslice_mask & 0x02) {
> +		*len = ARRAY_SIZE(mux_config_compute_extended_1_2_subslices_0x02);
> +		return mux_config_compute_extended_1_2_subslices_0x02;
> +	} else if (INTEL_INFO(dev_priv)->sseu.subslice_mask & 0x10) {
> +		*len = ARRAY_SIZE(mux_config_compute_extended_1_3_subslices_0x10);
> +		return mux_config_compute_extended_1_3_subslices_0x10;
> +	} else if (INTEL_INFO(dev_priv)->sseu.subslice_mask & 0x04) {
> +		*len = ARRAY_SIZE(mux_config_compute_extended_1_4_subslices_0x04);
> +		return mux_config_compute_extended_1_4_subslices_0x04;
> +	} else if (INTEL_INFO(dev_priv)->sseu.subslice_mask & 0x20) {
> +		*len = ARRAY_SIZE(mux_config_compute_extended_1_5_subslices_0x20);
> +		return mux_config_compute_extended_1_5_subslices_0x20;
> +	*len = ARRAY_SIZE(mux_config_compute_extended);
> +	return mux_config_compute_extended;
It looks like your script doesn't properly handle the unconditional mux
config here.

<SNIP>

> +
> +static const struct i915_oa_reg *
> +get_test_oa_mux_config(struct drm_i915_private *dev_priv,
> +		       int *len)
> +{
> +	*len = ARRAY_SIZE(mux_config_test_oa);
> +	return mux_config_test_oa;
> +}
> +
> +int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
> +{
> +	dev_priv->perf.oa.mux_regs = NULL;
> +	dev_priv->perf.oa.mux_regs_len = 0;
> +	dev_priv->perf.oa.b_counter_regs = NULL;
> +	dev_priv->perf.oa.b_counter_regs_len = 0;
> +	dev_priv->perf.oa.flex_regs = NULL;
> +	dev_priv->perf.oa.flex_regs_len = 0;
> +
> +	switch (dev_priv->perf.oa.metrics_set) {
> +	case METRIC_SET_ID_RENDER_BASIC:
> +		dev_priv->perf.oa.mux_regs =
> +			get_render_basic_mux_config(dev_priv,
> +						    &dev_priv->perf.oa.mux_regs_len);
> +		if (!dev_priv->perf.oa.mux_regs) {
> +			DRM_DEBUG_DRIVER("No suitable MUX config for \"RENDER_BASIC\" metric set");
Your script also needs to output a newline for DRM_DEBUG_DRIVER.



More information about the Intel-gfx mailing list