All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Badal Nilawar <badal.nilawar@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/xe: When GT is in RC6 donot assert if act freq is 0
Date: Mon, 26 Jun 2023 16:09:16 -0700	[thread overview]
Message-ID: <87352dddnn.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20230622093718.1689978-1-badal.nilawar@intel.com>

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

  parent reply	other threads:[~2023-06-26 23:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22  9:37 [igt-dev] [PATCH i-g-t] tests/xe: When GT is in RC6 donot assert if act freq is 0 Badal Nilawar
2023-06-22 11:54 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-06-22 22:51 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-06-26 23:09 ` Dixit, Ashutosh [this message]
2023-06-30 11:00   ` [igt-dev] [PATCH i-g-t] " Nilawar, Badal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87352dddnn.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.