[igt-dev] [PATCH i-g-t 3/3] tests/i915_pm_disag_freq: New test for media freq factor

Dixit, Ashutosh ashutosh.dixit at intel.com
Tue Apr 26 19:46:46 UTC 2022


On Fri, 22 Apr 2022 09:15:05 -0700, Kamil Konieczny wrote:
>
> > +	igt_debug("RP0 mhz: %d, RP1 mhz: %d, RPn mhz: %d, min mhz: %d, max mhz: %d, act mhz: %d\n", rp0, rp1, rpn, min, max, act);
> ---------------------- ^
>
> When printing please use proper names, so s/mhz/MHz/g

Done.

> > +	igt_debug("media RP0 mhz: %d, media RPn mhz: %d\n",
> ---------------------------- ^ ---------------- ^
> Same here.

This line is dropped for now but will fix when it's added back.

> > +	for (int v = 256; v >= 0; v -= 64) {
> > +		int getv, ret;
> > +
> > +		/*
> > +		 * Check that we can set the mode. Ratios other than 1:2
> > +		 * and 1:1 are not supported.
> > +		 */
> > +		ret = igt_sysfs_printf(dir, "media_freq_factor", "%u", v);
> > +		if (ret <= 0) {
> > +			igt_debug("Media ratio %.2f is not supported\n", v * scale);
> > +			continue;
> > +		}
> > +
> > +		wait_freq_set();
> > +
> > +		getv = igt_sysfs_get_u32(dir, "media_freq_factor");
> > +
> > +		igt_debug("media ratio set: %.2f, media ratio get: %.2f\n",
> > +			  v * scale, getv * scale);
>
> Maybe it is worth to print RPx and actual frequncies here ?

The problem is the actual media freq after setting the freq factor is not
available on current platforms but may be available on some future
platforms. RPx freq's don't change and they are being printed at the
beginning (now if you run the test with --debug).

Thanks.
--
Ashutosh


More information about the igt-dev mailing list