All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@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/i915_pm_freq_api: Add a suspend subtest
Date: Wed, 07 Jun 2023 14:12:39 -0700	[thread overview]
Message-ID: <87bkhrm0xk.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20230606203535.292739-1-vinay.belgaumkar@intel.com>

On Tue, 06 Jun 2023 13:35:35 -0700, Vinay Belgaumkar wrote:
>

Hi Vinay,

> Verify that SLPC API works as expected after a suspend.
>
> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> ---
>  tests/i915/i915_pm_freq_api.c | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>
> diff --git a/tests/i915/i915_pm_freq_api.c b/tests/i915/i915_pm_freq_api.c
> index 9005cd220..f35f1f8e0 100644
> --- a/tests/i915/i915_pm_freq_api.c
> +++ b/tests/i915/i915_pm_freq_api.c
> @@ -18,6 +18,9 @@
>   *
>   * SUBTEST: freq-reset
>   * Description: Test basic freq API works after a reset
> + *
> + * SUBTEST: freq-suspend
> + * Description: Test basic freq API works after a runtime suspend
>   */
>
>  IGT_TEST_DESCRIPTION("Test SLPC freq API");
> @@ -99,6 +102,24 @@ static void test_reset(int i915, int dirfd, int gt)
>	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
>  }
>
> +static void test_suspend(int i915, int dirfd, int gt)
> +{
> +	uint32_t rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ);
> +
> +	igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0);
> +	igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0);
> +	usleep(ACT_FREQ_LATENCY_US);
> +	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
> +	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
> +
> +	/* Manually trigger a suspend */
> +	igt_system_suspend_autoresume(SUSPEND_STATE_S3,
> +				      SUSPEND_TEST_NONE);
> +
> +	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
> +	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);

I am wondering what the purpose/value of this test (and also "freq-reset")
is?  How can the "set" min/max set freq (which are just input settings)
change whether or not there is a suspend/resume or a reset? Especially when
we just return cached min/max values from i915?

Thanks.
--
Ashutosh


> +}
> +
>  igt_main
>  {
>	int i915 = -1;
> @@ -143,6 +164,15 @@ igt_main
>				test_reset(i915, dirfd, gt);
>	}
>
> +	igt_describe("Test basic freq API works after suspend");
> +	igt_subtest_with_dynamic_f("freq-suspend") {
> +		int dirfd, gt;
> +
> +		for_each_sysfs_gt_dirfd(i915, dirfd, gt)
> +			igt_dynamic_f("gt%u", gt)
> +				test_suspend(i915, dirfd, gt);
> +	}
> +
>	igt_fixture {
>		int dirfd, gt;
>		/* Restore frequencies */
> --
> 2.38.1
>

WARNING: multiple messages have this Message-ID (diff)
From: "Dixit, Ashutosh" <ashutosh.dixit@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/i915_pm_freq_api: Add a suspend subtest
Date: Wed, 07 Jun 2023 14:12:39 -0700	[thread overview]
Message-ID: <87bkhrm0xk.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20230606203535.292739-1-vinay.belgaumkar@intel.com>

On Tue, 06 Jun 2023 13:35:35 -0700, Vinay Belgaumkar wrote:
>

Hi Vinay,

> Verify that SLPC API works as expected after a suspend.
>
> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> ---
>  tests/i915/i915_pm_freq_api.c | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>
> diff --git a/tests/i915/i915_pm_freq_api.c b/tests/i915/i915_pm_freq_api.c
> index 9005cd220..f35f1f8e0 100644
> --- a/tests/i915/i915_pm_freq_api.c
> +++ b/tests/i915/i915_pm_freq_api.c
> @@ -18,6 +18,9 @@
>   *
>   * SUBTEST: freq-reset
>   * Description: Test basic freq API works after a reset
> + *
> + * SUBTEST: freq-suspend
> + * Description: Test basic freq API works after a runtime suspend
>   */
>
>  IGT_TEST_DESCRIPTION("Test SLPC freq API");
> @@ -99,6 +102,24 @@ static void test_reset(int i915, int dirfd, int gt)
>	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
>  }
>
> +static void test_suspend(int i915, int dirfd, int gt)
> +{
> +	uint32_t rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ);
> +
> +	igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0);
> +	igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0);
> +	usleep(ACT_FREQ_LATENCY_US);
> +	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
> +	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
> +
> +	/* Manually trigger a suspend */
> +	igt_system_suspend_autoresume(SUSPEND_STATE_S3,
> +				      SUSPEND_TEST_NONE);
> +
> +	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
> +	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);

I am wondering what the purpose/value of this test (and also "freq-reset")
is?  How can the "set" min/max set freq (which are just input settings)
change whether or not there is a suspend/resume or a reset? Especially when
we just return cached min/max values from i915?

Thanks.
--
Ashutosh


> +}
> +
>  igt_main
>  {
>	int i915 = -1;
> @@ -143,6 +164,15 @@ igt_main
>				test_reset(i915, dirfd, gt);
>	}
>
> +	igt_describe("Test basic freq API works after suspend");
> +	igt_subtest_with_dynamic_f("freq-suspend") {
> +		int dirfd, gt;
> +
> +		for_each_sysfs_gt_dirfd(i915, dirfd, gt)
> +			igt_dynamic_f("gt%u", gt)
> +				test_suspend(i915, dirfd, gt);
> +	}
> +
>	igt_fixture {
>		int dirfd, gt;
>		/* Restore frequencies */
> --
> 2.38.1
>

  parent reply	other threads:[~2023-06-07 21:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06 20:35 [igt-dev] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest Vinay Belgaumkar
2023-06-06 20:35 ` [Intel-gfx] " Vinay Belgaumkar
2023-06-06 20:49 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2023-06-06 21:25 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-06-07 12:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-06-07 21:12 ` Dixit, Ashutosh [this message]
2023-06-07 21:12   ` [Intel-gfx] [igt-dev] [PATCH i-g-t] " Dixit, Ashutosh
2023-06-07 22:31   ` Belgaumkar, Vinay
2023-06-07 22:31     ` [Intel-gfx] " Belgaumkar, Vinay
2023-06-07 22:56     ` Dixit, Ashutosh
2023-06-07 22:56       ` [Intel-gfx] " Dixit, Ashutosh
2023-06-07 23:11       ` Belgaumkar, Vinay
2023-06-07 23:11         ` [Intel-gfx] " Belgaumkar, Vinay
2023-06-07 23:40         ` [igt-dev] [Intel-gfx] " Belgaumkar, Vinay
2023-06-07 23:40           ` [Intel-gfx] [igt-dev] " Belgaumkar, Vinay
2023-06-07 23:49           ` [igt-dev] [Intel-gfx] " Dixit, Ashutosh
2023-06-07 23:49             ` [Intel-gfx] [igt-dev] " Dixit, Ashutosh
2023-06-09  1:25           ` [igt-dev] [Intel-gfx] " Dixit, Ashutosh
2023-06-09  1:25             ` [Intel-gfx] [igt-dev] " Dixit, Ashutosh

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=87bkhrm0xk.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@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.