From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 31 Mar 2023 16:56:37 -0700 Message-ID: <87bkk8h3uy.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Vinay Belgaumkar In-Reply-To: <20230328020028.2143954-3-vinay.belgaumkar@intel.com> References: <20230328020028.2143954-1-vinay.belgaumkar@intel.com> <20230328020028.2143954-3-vinay.belgaumkar@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 2/2] i915_pm_freq_api: Add some basic SLPC igt tests List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Mon, 27 Mar 2023 19:00:28 -0700, Vinay Belgaumkar wrote: > Hi Vinay, > +/* > + * Too many intermediate components and steps before freq is adjusted > + * Specially if workload is under execution, so let's wait 100 ms. > + */ > +#define ACT_FREQ_LATENCY_US 100000 > + > +static uint32_t get_freq(int dirfd, uint8_t id) > +{ > + uint32_t val; > + > + igt_require(igt_sysfs_rps_scanf(dirfd, id, "%u", &val) == 1); igt_assert? > +static void test_freq_basic_api(int dirfd, int gt) > +{ > + uint32_t rpn, rp0, rpe; > + > + /* Save frequencies */ > + rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ); > + rp0 = get_freq(dirfd, RPS_RP0_FREQ_MHZ); > + rpe = get_freq(dirfd, RPS_RP1_FREQ_MHZ); > + igt_info("System min freq: %dMHz; max freq: %dMHz\n", rpn, rp0); > + > + /* > + * Negative bound tests > + * RPn is the floor > + * RP0 is the ceiling > + */ > + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); > + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rp0 + 1) < 0); > + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); Is this supposed to be RPS_MAX_FREQ_MHZ? > + igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rp0 + 1) < 0); > + After addressing the above, this is: Reviewed-by: Ashutosh Dixit Also, before merging it would be good to see the results of the new tests. So could you add a HAX patch adding the new tests to fast-feedback.testlist and resend the series? Thanks. -- Ashutosh