[igt-dev] [PATCH i-g-t 2/4] tests/xe : Add a test to check if gt is in c6 on idle

Gupta, Anshuman anshuman.gupta at intel.com
Wed Jun 28 10:17:46 UTC 2023



> -----Original Message-----
> From: Tauro, Riana <riana.tauro at intel.com>
> Sent: Wednesday, June 28, 2023 3:05 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Tauro, Riana <riana.tauro at intel.com>; Gupta, Anshuman
> <anshuman.gupta at intel.com>; Dixit, Ashutosh <ashutosh.dixit at intel.com>;
> Belgaumkar, Vinay <vinay.belgaumkar at intel.com>; Nilawar, Badal
> <badal.nilawar at intel.com>; kamil.konieczny at linux.intel.com; Sundaresan,
> Sujaritha <sujaritha.sundaresan at intel.com>
> Subject: [PATCH i-g-t 2/4] tests/xe : Add a test to check if gt is in c6 on idle
> 
> Add a test that checks if gt is in c6 on idle
Use full stop after end of commit log.
> 
> Signed-off-by: Riana Tauro <riana.tauro at intel.com>
> ---
>  tests/xe/xe_pm_residency.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/tests/xe/xe_pm_residency.c b/tests/xe/xe_pm_residency.c
> index 19fbe14e..4f6c23aa 100644
> --- a/tests/xe/xe_pm_residency.c
> +++ b/tests/xe/xe_pm_residency.c
> @@ -47,6 +47,11 @@ static unsigned int measured_usleep(unsigned int
> usec)
>  	return igt_nsec_elapsed(&ts) / 1000;
>  }
> 
> +/**
> + * SUBTEST: gt-c6-on-idle
> + * Description: check if gt is in C6 on idle
> + * Run type: BAT
> + */
>  static bool in_gt_c6(int sysfs, int gt)  {
>  	char path[PATH_MAX];
> @@ -107,6 +112,11 @@ igt_main
>  		igt_assert(sysfs != -1);
>  	}
> 
> +	igt_describe("check if gt is in c6 on idle");
%s/"check"/"validate"
> +	igt_subtest("gt-c6-on-idle")
> +		xe_for_each_gt(fd, gt)
> +			assert(igt_wait(in_gt_c6(sysfs, gt), 1000, 1));
		We should use igt_assert().
		With all above,
		Reviewed-by: Anshuman Gupta <anshuman.gupta at intel.com>
> +
>  	igt_describe("check idle residency within a time interval is within
> tolerance");
>  	igt_subtest("idle-residency")
>  		xe_for_each_gt(fd, gt)
> --
> 2.40.0



More information about the igt-dev mailing list