Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: <janga.rahul.kumar@intel.com>
Cc: <igt-dev@lists.freedesktop.org>, <ramadevi.gandi@intel.com>,
	<matthew.d.roper@intel.com>, <badal.nilawar@intel.com>
Subject: Re: [PATCH i-g-t 3/3] tests/intel/xe_pm: Add mocs S2-idle/S3/S4 suspend resume test
Date: Tue, 7 May 2024 08:42:08 -0400	[thread overview]
Message-ID: <ZjohoMCbkpB7CfVE@intel.com> (raw)
In-Reply-To: <20240504130458.2102132-4-janga.rahul.kumar@intel.com>

On Sat, May 04, 2024 at 06:34:58PM +0530, janga.rahul.kumar@intel.com wrote:
> From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
> 
> Add test to check mocs values are retained over S2-idle/S3/S4
> suspend resume states.
> 
> Cc: Badal Nilawar <badal.nilawar@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
> ---
>  tests/intel/xe_pm.c | 29 +++++++++++++++++++----------
>  1 file changed, 19 insertions(+), 10 deletions(-)
> 
> diff --git a/tests/intel/xe_pm.c b/tests/intel/xe_pm.c
> index 73fd57636..fe77512fb 100644
> --- a/tests/intel/xe_pm.c
> +++ b/tests/intel/xe_pm.c
> @@ -251,6 +251,10 @@ static void close_fw_handle(int sig)
>   * Description: suspend/autoresume on %arg[1] state and exec after RPM
>   * Functionality: pm - %arg[1]
>   *
> + * SUBTEST: %s-mocs
> + * Description: test checks for mocs state before and after %arg[1] state
> + * Functionality: pm - %arg[1]
> + *
>   * arg[1]:
>   *
>   * @s2idle:	s2idle
> @@ -617,7 +621,7 @@ static void test_mmap(device_t device, uint32_t placement, uint32_t flags)
>   * Functionality: mocs
>   * Run type: FULL
>   */
> -static void test_mocs_suspend_resume(device_t device)
> +static void test_mocs_suspend_resume(device_t device, bool runtime_sr, enum igt_suspend_state state)
>  {
>  	int gt;
>  
> @@ -632,14 +636,17 @@ static void test_mocs_suspend_resume(device_t device)
>  		igt_debugfs_dump(device.fd_xe, path);
>  		igt_debugfs_read(device.fd_xe, path, mocs_content_pre);
>  
> -		fw_handle = igt_debugfs_open(device.fd_xe, "forcewake_all", O_RDONLY);
> -		igt_assert(fw_handle >= 0);
> -		igt_assert(igt_get_runtime_pm_status() == IGT_RUNTIME_PM_STATUS_ACTIVE);
> -
> -		/* Runtime suspend  */
> -		close(fw_handle);
> -		igt_assert(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED));
> +		if (runtime_sr) {
> +			fw_handle = igt_debugfs_open(device.fd_xe, "forcewake_all", O_RDONLY);
> +			igt_assert(fw_handle >= 0);
> +			igt_assert(igt_get_runtime_pm_status() == IGT_RUNTIME_PM_STATUS_ACTIVE);
>  
> +			/* Runtime suspend  */
> +			close(fw_handle);
> +			igt_assert(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED));
> +		} else {
> +			igt_system_suspend_autoresume(state, SUSPEND_TEST_NONE);

please notice that Lucas had recently changed the S4 case in the test_exec function.
We should follow that, or this will break in CI again.

> +		}
>  		igt_assert(igt_debugfs_exists(device.fd_xe, path, O_RDONLY));
>  		igt_debugfs_dump(device.fd_xe, path);
>  		igt_debugfs_read(device.fd_xe, path, mocs_contents_post);
> @@ -742,6 +749,9 @@ igt_main
>  				cleanup_d3(device);
>  			}
>  		}
> +
> +		igt_subtest_f("%s-mocs", s->name)
> +			test_mocs_suspend_resume(device, 0, s->state);
>  	}
>  
>  	for (const struct d_state *d = d_states; d->name; d++) {
> @@ -808,8 +818,7 @@ igt_main
>  		}
>  
>  		igt_subtest("mocs_suspend_resume")
> -			test_mocs_suspend_resume(device);
> -
> +			test_mocs_suspend_resume(device, 1, 0);
>  	}
>  
>  	igt_fixture {
> -- 
> 2.25.1
> 

  parent reply	other threads:[~2024-05-07 12:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-04 13:04 [PATCH i-g-t v3 0/3] Add mocs tests janga.rahul.kumar
2024-05-04 13:04 ` [PATCH i-g-t 1/3] tests/intel/xe_debugfs: Extend gt test to check mocs entry janga.rahul.kumar
2024-05-04 13:04 ` [PATCH i-g-t 2/3] tests/intel/xe_pm: Add mocs runtime suspend resume test janga.rahul.kumar
2024-05-07  9:42   ` Nilawar, Badal
2024-05-04 13:04 ` [PATCH i-g-t 3/3] tests/intel/xe_pm: Add mocs S2-idle/S3/S4 " janga.rahul.kumar
2024-05-07  9:50   ` Nilawar, Badal
2024-05-07 12:42   ` Rodrigo Vivi [this message]
2024-05-04 13:42 ` ✓ Fi.CI.BAT: success for Add mocs tests (rev3) Patchwork
2024-05-04 13:45 ` ✓ CI.xeBAT: " Patchwork
2024-05-04 14:43 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-04 14:48 ` ✓ Fi.CI.IGT: success " Patchwork

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=ZjohoMCbkpB7CfVE@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=janga.rahul.kumar@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=ramadevi.gandi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox