[igt-dev] [PATCH i-g-t] tests/xe: When GT is in RC6 donot assert if act freq is 0
Dixit, Ashutosh
ashutosh.dixit at intel.com
Mon Jun 26 23:09:16 UTC 2023
On Thu, 22 Jun 2023 02:37:18 -0700, Badal Nilawar wrote:
>
> @@ -223,13 +244,15 @@ static void test_freq_fixed(int sysfs, int gt_id)
> igt_assert(set_freq(sysfs, gt_id, "max", rpn) > 0);
> usleep(ACT_FREQ_LATENCY_US);
> igt_assert(get_freq(sysfs, gt_id, "cur") == rpn);
> - igt_assert(get_freq(sysfs, gt_id, "act") == rpn);
> + if (!in_rc6(sysfs, gt_id))
> + igt_assert(get_freq(sysfs, gt_id, "act") == rpn);
>
> igt_assert(set_freq(sysfs, gt_id, "min", rpe) > 0);
> igt_assert(set_freq(sysfs, gt_id, "max", rpe) > 0);
> usleep(ACT_FREQ_LATENCY_US);
> igt_assert(get_freq(sysfs, gt_id, "cur") == rpe);
> - igt_assert(get_freq(sysfs, gt_id, "act") == rpe);
> + if (!in_rc6(sysfs, gt_id))
> + igt_assert(get_freq(sysfs, gt_id, "act") == rpe);
>
> igt_assert(set_freq(sysfs, gt_id, "min", rp0) > 0);
> igt_assert(set_freq(sysfs, gt_id, "max", rp0) > 0);
> @@ -269,7 +292,8 @@ static void test_freq_range(int sysfs, int gt_id)
> cur = get_freq(sysfs, gt_id, "cur");
> igt_assert(rpn <= cur && cur <= rpe);
> act = get_freq(sysfs, gt_id, "act");
> - igt_assert(rpn <= act && act <= rpe);
> + if (!in_rc6(sysfs, gt_id))
> + igt_assert(rpn <= act && act <= rpe);
Basically slightly racy because in_rc6() and get_freq() are not done
atomically, but maybe ok here if not causing false positives?
Further, do we need to add the following else's here:
if (!in_rc6(sysfs, gt_id))
igt_assert(rpn <= act && act <= rpe);
else
igt_assert(act == 0);
Or is that likely to blow up?
Ashutosh
More information about the igt-dev
mailing list