Lines Matching refs:freqs

87 static void read_freqs(int *freqs)  in read_freqs()  argument
92 freqs[i] = readval(sysfs_files[i].filp); in read_freqs()
116 int freqs[NUMFREQ]; in wait_freq_settle() local
118 read_freqs(freqs); in wait_freq_settle()
119 if (freqs[CUR] >= freqs[MIN] && freqs[CUR] <= freqs[MAX]) in wait_freq_settle()
154 static void check_freq_constraints(const int *freqs) in check_freq_constraints() argument
156 igt_assert_lte(freqs[MIN], freqs[MAX]); in check_freq_constraints()
157 igt_assert_lte(freqs[CUR], freqs[MAX]); in check_freq_constraints()
158 igt_assert_lte(freqs[RPn], freqs[CUR]); in check_freq_constraints()
159 igt_assert_lte(freqs[RPn], freqs[MIN]); in check_freq_constraints()
160 igt_assert_lte(freqs[MAX], freqs[RP0]); in check_freq_constraints()
161 igt_assert_lte(freqs[RP1], freqs[RP0]); in check_freq_constraints()
162 igt_assert_lte(freqs[RPn], freqs[RP1]); in check_freq_constraints()
163 igt_assert_neq(freqs[RP0], 0); in check_freq_constraints()
164 igt_assert_neq(freqs[RP1], 0); in check_freq_constraints()
167 static void dump(const int *freqs) in dump() argument
173 igt_debug(" %s=%d", sysfs_files[i].name, freqs[i]); in dump()
335 int freqs[NUMFREQ]; in get_hw_rounded_freq() local
340 read_freqs(freqs); in get_hw_rounded_freq()
342 if (freqs[MIN] > target) in get_hw_rounded_freq()
347 old_freq = freqs[idx]; in get_hw_rounded_freq()
349 read_freqs(freqs); in get_hw_rounded_freq()
350 ret = freqs[idx]; in get_hw_rounded_freq()
452 int freqs[NUMFREQ]; in basic_check() local
454 read_freqs(freqs); in basic_check()
455 dump(freqs); in basic_check()
456 check_freq_constraints(freqs); in basic_check()
463 int freqs[NUMFREQ]; in idle_check() local
469 read_freqs(freqs); in idle_check()
470 dump(freqs); in idle_check()
471 check_freq_constraints(freqs); in idle_check()
472 if (freqs[CUR] == freqs[RPn]) in idle_check()
479 igt_assert_eq(freqs[CUR], freqs[RPn]); in idle_check()
487 int freqs[NUMFREQ]; in loaded_check() local
493 read_freqs(freqs); in loaded_check()
494 dump(freqs); in loaded_check()
495 check_freq_constraints(freqs); in loaded_check()
496 if (freqs[CUR] >= freqs[MAX]) in loaded_check()
503 igt_assert_lte(freqs[MAX], freqs[CUR]); in loaded_check()
511 int freqs[NUMFREQ]; in stabilize_check() local
516 read_freqs(freqs); in stabilize_check()
517 dump(freqs); in stabilize_check()
523 if (memcmp(freqs, out, sizeof(freqs)) == 0) in stabilize_check()
526 memcpy(freqs, out, sizeof(freqs)); in stabilize_check()