Lines Matching refs:gt

22 	struct intel_gt *gt;  member
53 static int slpc_set_freq(struct intel_gt *gt, u32 freq) in slpc_set_freq() argument
56 struct intel_guc_slpc *slpc = &gt->uc.guc.slpc; in slpc_set_freq()
98 static u64 measure_power_at_freq(struct intel_gt *gt, int *freq, u64 *power) in measure_power_at_freq() argument
102 err = slpc_set_freq(gt, *freq); in measure_power_at_freq()
105 *freq = intel_rps_read_actual_frequency(&gt->rps); in measure_power_at_freq()
106 *power = measure_power(&gt->rps, freq); in measure_power_at_freq()
183 static int slpc_power(struct intel_gt *gt, struct intel_engine_cs *engine) in slpc_power() argument
185 struct intel_guc_slpc *slpc = &gt->uc.guc.slpc; in slpc_power()
197 if (!librapl_supported(gt->i915)) in slpc_power()
201 err = measure_power_at_freq(gt, &min.freq, &min.power); in slpc_power()
207 err = measure_power_at_freq(gt, &max.freq, &max.power); in slpc_power()
237 struct intel_gt *gt = rps_to_gt(rps); in max_granted_freq() local
248 perf_limit_reasons = intel_uncore_read(gt->uncore, in max_granted_freq()
249 intel_gt_perf_limit_reasons_reg(gt)); in max_granted_freq()
263 static int run_test(struct intel_gt *gt, int test_type) in run_test() argument
265 struct intel_guc_slpc *slpc = &gt->uc.guc.slpc; in run_test()
266 struct intel_rps *rps = &gt->rps; in run_test()
273 if (!intel_uc_uses_guc_slpc(&gt->uc)) in run_test()
281 if (igt_spinner_init(&spin, gt)) in run_test()
313 intel_gt_pm_wait_for_idle(gt); in run_test()
314 intel_gt_pm_get(gt); in run_test()
315 for_each_engine(engine, gt, id) { in run_test()
340 intel_gt_set_wedged(engine->gt); in run_test()
357 if (gt->type != GT_MEDIA && (engine->class == VIDEO_DECODE_CLASS || in run_test()
369 err = slpc_power(gt, engine); in run_test()
381 intel_uncore_read(gt->uncore, in run_test()
382 intel_gt_perf_limit_reasons_reg(gt))); in run_test()
397 if (igt_flush_test(gt->i915)) in run_test()
400 intel_gt_pm_put(gt); in run_test()
402 intel_gt_pm_wait_for_idle(gt); in run_test()
410 struct intel_gt *gt; in live_slpc_vary_min() local
414 for_each_gt(gt, i915, i) { in live_slpc_vary_min()
415 ret = run_test(gt, VARY_MIN); in live_slpc_vary_min()
426 struct intel_gt *gt; in live_slpc_vary_max() local
430 for_each_gt(gt, i915, i) { in live_slpc_vary_max()
431 ret = run_test(gt, VARY_MAX); in live_slpc_vary_max()
443 struct intel_gt *gt; in live_slpc_max_granted() local
447 for_each_gt(gt, i915, i) { in live_slpc_max_granted()
448 ret = run_test(gt, MAX_GRANTED); in live_slpc_max_granted()
459 struct intel_gt *gt; in live_slpc_power() local
463 for_each_gt(gt, i915, i) { in live_slpc_power()
464 ret = run_test(gt, SLPC_POWER); in live_slpc_power()
476 thread->result = run_test(thread->gt, TILE_INTERACTION); in slpc_spinner_thread()
482 struct intel_gt *gt; in live_slpc_tile_interaction() local
490 for_each_gt(gt, i915, i) { in live_slpc_tile_interaction()
491 threads[i].worker = kthread_create_worker(0, "igt/slpc_parallel:%d", gt->info.id); in live_slpc_tile_interaction()
498 threads[i].gt = gt; in live_slpc_tile_interaction()
503 for_each_gt(gt, i915, i) { in live_slpc_tile_interaction()
512 pr_err("%s GT %d failed ", __func__, gt->info.id); in live_slpc_tile_interaction()
532 struct intel_gt *gt; in intel_slpc_live_selftests() local
535 for_each_gt(gt, i915, i) { in intel_slpc_live_selftests()
536 if (intel_gt_is_wedged(gt)) in intel_slpc_live_selftests()