From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 14AD010E268 for ; Mon, 26 Jun 2023 23:09:18 +0000 (UTC) Date: Mon, 26 Jun 2023 16:09:16 -0700 Message-ID: <87352dddnn.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Badal Nilawar In-Reply-To: <20230622093718.1689978-1-badal.nilawar@intel.com> References: <20230622093718.1689978-1-badal.nilawar@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] tests/xe: When GT is in RC6 donot assert if act freq is 0 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 Thu, 22 Jun 2023 02:37:18 -0700, Badal Nilawar wrote: > > @@ -223,13 +244,15 @@ static void test_freq_fixed(int sysfs, int gt_id) > igt_assert(set_freq(sysfs, gt_id, "max", rpn) > 0); > usleep(ACT_FREQ_LATENCY_US); > igt_assert(get_freq(sysfs, gt_id, "cur") == rpn); > - igt_assert(get_freq(sysfs, gt_id, "act") == rpn); > + if (!in_rc6(sysfs, gt_id)) > + igt_assert(get_freq(sysfs, gt_id, "act") == rpn); > > igt_assert(set_freq(sysfs, gt_id, "min", rpe) > 0); > igt_assert(set_freq(sysfs, gt_id, "max", rpe) > 0); > usleep(ACT_FREQ_LATENCY_US); > igt_assert(get_freq(sysfs, gt_id, "cur") == rpe); > - igt_assert(get_freq(sysfs, gt_id, "act") == rpe); > + if (!in_rc6(sysfs, gt_id)) > + igt_assert(get_freq(sysfs, gt_id, "act") == rpe); > > igt_assert(set_freq(sysfs, gt_id, "min", rp0) > 0); > igt_assert(set_freq(sysfs, gt_id, "max", rp0) > 0); > @@ -269,7 +292,8 @@ static void test_freq_range(int sysfs, int gt_id) > cur = get_freq(sysfs, gt_id, "cur"); > igt_assert(rpn <= cur && cur <= rpe); > act = get_freq(sysfs, gt_id, "act"); > - igt_assert(rpn <= act && act <= rpe); > + if (!in_rc6(sysfs, gt_id)) > + igt_assert(rpn <= act && act <= rpe); Basically slightly racy because in_rc6() and get_freq() are not done atomically, but maybe ok here if not causing false positives? Further, do we need to add the following else's here: if (!in_rc6(sysfs, gt_id)) igt_assert(rpn <= act && act <= rpe); else igt_assert(act == 0); Or is that likely to blow up? Ashutosh