All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/xe_guc_pc: Restore max freq first
Date: Sun, 26 Mar 2023 06:51:03 -0400	[thread overview]
Message-ID: <ZCAjl7AmtScKwKHf@intel.com> (raw)
In-Reply-To: <20230325003442.1767568-1-vinay.belgaumkar@intel.com>

On Fri, Mar 24, 2023 at 05:34:42PM -0700, Vinay Belgaumkar wrote:
> When min/max are both at RPn, restoring min back to 300
> will not work. Max needs to be increased first.

why max needs to come first in this case? we should probably at
least document so we don't forget it again...

> Also, add
> igt_assert() here, which would have caught the issue.

I was going to ask if we should really add asserts inside the fixture
or maybe using igt_require instead, but then I noticed more cases
doing the assert...

> 
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> ---
>  tests/xe/xe_guc_pc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/xe/xe_guc_pc.c b/tests/xe/xe_guc_pc.c
> index 60c93288..43bf6f48 100644
> --- a/tests/xe/xe_guc_pc.c
> +++ b/tests/xe/xe_guc_pc.c
> @@ -489,8 +489,8 @@ igt_main
>  
>  	igt_fixture {
>  		xe_for_each_gt(fd, gt) {
> -			set_freq(sysfs, gt, "min", stash_min);
> -			set_freq(sysfs, gt, "max", stash_max);
> +			igt_assert(set_freq(sysfs, gt, "max", stash_max) > 0);
> +			igt_assert(set_freq(sysfs, gt, "min", stash_min) > 0);
>  		}
>  		close(sysfs);
>  		xe_device_put(fd);
> -- 
> 2.38.1
> 

WARNING: multiple messages have this Message-ID (diff)
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] tests/xe_guc_pc: Restore max freq first
Date: Sun, 26 Mar 2023 06:51:03 -0400	[thread overview]
Message-ID: <ZCAjl7AmtScKwKHf@intel.com> (raw)
In-Reply-To: <20230325003442.1767568-1-vinay.belgaumkar@intel.com>

On Fri, Mar 24, 2023 at 05:34:42PM -0700, Vinay Belgaumkar wrote:
> When min/max are both at RPn, restoring min back to 300
> will not work. Max needs to be increased first.

why max needs to come first in this case? we should probably at
least document so we don't forget it again...

> Also, add
> igt_assert() here, which would have caught the issue.

I was going to ask if we should really add asserts inside the fixture
or maybe using igt_require instead, but then I noticed more cases
doing the assert...

> 
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> ---
>  tests/xe/xe_guc_pc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/xe/xe_guc_pc.c b/tests/xe/xe_guc_pc.c
> index 60c93288..43bf6f48 100644
> --- a/tests/xe/xe_guc_pc.c
> +++ b/tests/xe/xe_guc_pc.c
> @@ -489,8 +489,8 @@ igt_main
>  
>  	igt_fixture {
>  		xe_for_each_gt(fd, gt) {
> -			set_freq(sysfs, gt, "min", stash_min);
> -			set_freq(sysfs, gt, "max", stash_max);
> +			igt_assert(set_freq(sysfs, gt, "max", stash_max) > 0);
> +			igt_assert(set_freq(sysfs, gt, "min", stash_min) > 0);
>  		}
>  		close(sysfs);
>  		xe_device_put(fd);
> -- 
> 2.38.1
> 

  parent reply	other threads:[~2023-03-26 10:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-25  0:34 [igt-dev] [PATCH i-g-t] tests/xe_guc_pc: Restore max freq first Vinay Belgaumkar
2023-03-25  0:34 ` [Intel-gfx] " Vinay Belgaumkar
2023-03-25  1:06 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-03-25  9:06 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-03-26 10:51 ` Rodrigo Vivi [this message]
2023-03-26 10:51   ` [Intel-gfx] [igt-dev] [PATCH i-g-t] " Rodrigo Vivi
2023-03-27 23:04   ` Belgaumkar, Vinay
2023-03-27 23:04     ` [Intel-gfx] " Belgaumkar, Vinay

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=ZCAjl7AmtScKwKHf@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=vinay.belgaumkar@intel.com \
    /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.