From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3D18D10E066 for ; Tue, 18 Jul 2023 04:52:19 +0000 (UTC) Date: Mon, 17 Jul 2023 21:51:29 -0700 Message-ID: <87jzuxizzi.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: "Nilawar, Badal" In-Reply-To: <87lefdj0ex.wl-ashutosh.dixit@intel.com> References: <20230717105711.3277000-1-badal.nilawar@intel.com> <87o7kahruu.wl-ashutosh.dixit@intel.com> <87lefdj0ex.wl-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 v2] tests/xe: Verify actual frequency on the basis of GT state List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: 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.