[igt-dev] [PATCH i-g-t v2] tests/xe: Verify actual frequency on the basis of GT state

Dixit, Ashutosh ashutosh.dixit at intel.com
Tue Jul 18 04:51:29 UTC 2023


On Mon, 17 Jul 2023 21:42:14 -0700, Dixit, Ashutosh wrote:
>
> On Mon, 17 Jul 2023 21:27:02 -0700, Nilawar, Badal wrote:
> >
> > >> @@ -226,6 +226,9 @@ static void test_freq_fixed(int fd, int gt_id)
> > >>
> > >>	igt_debug("Starting testing fixed request\n");
> > >>
> > >> +	if (gt_idle)
> > >> +		igt_require(igt_wait(xe_is_gt_in_c6(fd, gt_id), 1000, 1));
> > >> +
> > >>	/*
> > >>	 * For Fixed freq we need to set both min and max to the desired value
> > >>	 * Then we check if hardware is actually operating at the desired freq
> > >> @@ -235,13 +238,25 @@ static void test_freq_fixed(int fd, int gt_id)
> > >>	igt_assert(set_freq(fd, gt_id, "max", rpn) > 0);
> > >>	usleep(ACT_FREQ_LATENCY_US);
> > >>	igt_assert(get_freq(fd, gt_id, "cur") == rpn);
> > >> -	igt_assert(get_freq(fd, gt_id, "act") == rpn);
> > >> +
> > >> +	if (gt_idle) {
> > >> +		usleep(ACT_FREQ_LATENCY_US);
> > >
> > > Looks like this usleep should in the else? Since we've already igt_wait'ed
> > > above for the idle case? In all places in this patch.
> >
> > As get_freq(fd, gt_id, "cur") will forcewake the gt so added usleep to gt
> > to settle down.
>
> Ah good point. I missed that reading requested freq takes forcewake (unlike
> act freq).

One idea to remove this extra delay would be to read act freq first and
then read cur. Otherwise, maybe add a comment in one place saying reading
cur will take forcewake. Thanks.


More information about the igt-dev mailing list