From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 89C6710E449 for ; Tue, 26 Apr 2022 19:46:47 +0000 (UTC) Date: Tue, 26 Apr 2022 12:46:46 -0700 Message-ID: <87r15j6315.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Kamil Konieczny , igt-dev@lists.freedesktop.org, Anshuman Gupta , Ashutosh Dixit In-Reply-To: References: <85c51c99da76e3fe286ed28e80fa964e148f6020.1650435058.git.ashutosh.dixit@intel.com> <4257c39f2bdffe8b2fbaf36cfb720841c21b4d22.1650435058.git.ashutosh.dixit@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t 3/3] tests/i915_pm_disag_freq: New test for media freq factor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: 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