Lines Matching full:perf

20 alloc_empty_config(struct i915_perf *perf)  in alloc_empty_config()  argument
28 oa_config->perf = perf; in alloc_empty_config()
33 mutex_lock(&perf->metrics_lock); in alloc_empty_config()
35 oa_config->id = idr_alloc(&perf->metrics_idr, oa_config, 2, 0, GFP_KERNEL); in alloc_empty_config()
37 mutex_unlock(&perf->metrics_lock); in alloc_empty_config()
42 mutex_unlock(&perf->metrics_lock); in alloc_empty_config()
48 destroy_empty_config(struct i915_perf *perf) in destroy_empty_config() argument
53 mutex_lock(&perf->metrics_lock); in destroy_empty_config()
55 idr_for_each_entry(&perf->metrics_idr, tmp, id) { in destroy_empty_config()
63 idr_remove(&perf->metrics_idr, oa_config->id); in destroy_empty_config()
65 mutex_unlock(&perf->metrics_lock); in destroy_empty_config()
72 get_empty_config(struct i915_perf *perf) in get_empty_config() argument
77 mutex_lock(&perf->metrics_lock); in get_empty_config()
79 idr_for_each_entry(&perf->metrics_idr, tmp, id) { in get_empty_config()
86 mutex_unlock(&perf->metrics_lock); in get_empty_config()
92 test_stream(struct i915_perf *perf) in test_stream() argument
95 struct i915_oa_config *oa_config = get_empty_config(perf); in test_stream()
97 .engine = intel_engine_lookup_user(perf->i915, in test_stream()
101 .oa_format = IS_GEN(perf->i915, 12) ? in test_stream()
117 stream->perf = perf; in test_stream()
119 mutex_lock(&perf->lock); in test_stream()
124 mutex_unlock(&perf->lock); in test_stream()
133 struct i915_perf *perf = stream->perf; in stream_destroy() local
135 mutex_lock(&perf->lock); in stream_destroy()
137 mutex_unlock(&perf->lock); in stream_destroy()
145 /* Quick check we can create a perf stream */ in live_sanitycheck()
147 stream = test_stream(&i915->perf); in live_sanitycheck()
204 stream = test_stream(&i915->perf); in live_noa_delay()
208 expected = atomic64_read(&stream->perf->noa_programming_delay); in live_noa_delay()
297 stream = test_stream(&i915->perf); in live_noa_gpr()
422 struct i915_perf *perf = &i915->perf; in i915_perf_live_selftests() local
425 if (!perf->metrics_kobj || !perf->ops.enable_metric_set) in i915_perf_live_selftests()
431 err = alloc_empty_config(&i915->perf); in i915_perf_live_selftests()
437 destroy_empty_config(&i915->perf); in i915_perf_live_selftests()