}
static int emit_oa_config(struct i915_perf_stream *stream,
+ struct i915_oa_config *oa_config,
struct intel_context *ce)
{
struct i915_request *rq;
struct i915_vma *vma;
int err;
- vma = get_oa_vma(stream, stream->oa_config);
+ vma = get_oa_vma(stream, oa_config);
if (IS_ERR(vma))
return PTR_ERR(vma);
intel_uncore_rmw(uncore, GEN6_UCGCTL1,
0, GEN6_CSUNIT_CLOCK_GATE_DISABLE);
- return emit_oa_config(stream, oa_context(stream));
+ return emit_oa_config(stream, stream->oa_config, oa_context(stream));
}
static void hsw_disable_metric_set(struct i915_perf_stream *stream)
static int gen8_enable_metric_set(struct i915_perf_stream *stream)
{
struct intel_uncore *uncore = stream->uncore;
- const struct i915_oa_config *oa_config = stream->oa_config;
+ struct i915_oa_config *oa_config = stream->oa_config;
int ret;
/*
if (ret)
return ret;
- return emit_oa_config(stream, oa_context(stream));
+ return emit_oa_config(stream, oa_config, oa_context(stream));
}
static void gen8_disable_metric_set(struct i915_perf_stream *stream)
* When set globally, we use a low priority kernel context,
* so it will effectively take effect when idle.
*/
- err = emit_oa_config(stream, oa_context(stream));
+ err = emit_oa_config(stream, config, oa_context(stream));
if (err == 0)
config = xchg(&stream->oa_config, config);
else