Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Riana Tauro <riana.tauro@intel.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>,
	<igt-dev@lists.freedesktop.org>
Cc: <saurabhg.gupta@intel.com>, <alex.zuo@intel.com>,
	<kamil.konieczny@linux.intel.com>
Subject: Re: [PATCH v3] tests/intel/xe_pm_residency: Skip on igt_power_open failure
Date: Tue, 19 Nov 2024 12:11:54 +0530	[thread overview]
Message-ID: <0886a572-3c7a-4706-86f3-140b5e183cb3@intel.com> (raw)
In-Reply-To: <20241023215851.98090-1-jonathan.cavitt@intel.com>



On 10/24/2024 3:28 AM, Jonathan Cavitt wrote:
> The xe_pm_residency@toggle-gt-c6 test fails when
> gt_c6_power >= gt_c0_power.  These values are reported by
> igt_power_get_mW, which will always report 0 in the case that
> igt_power_open fails to open either the hwmon_fd or rapl.fd.  Since the
> expected result will always be a failure in this case, skip the
> assertion that gt_c6_power < gt_c0_power.
> 
> v2: Do not skip the full test, and instead only ignore the part that is
> guaranteed to fail.
> 
> v3: Use || instead of && (Riana)
> 
> Signed-off-by: Jonathan-Cavitt <jonathan.cavitt@intel.com>
> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
LGTM
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
> CC: Riana Tauro <riana.tauro@intel.com>
> ---
>   tests/intel/xe_pm_residency.c | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/intel/xe_pm_residency.c b/tests/intel/xe_pm_residency.c
> index 772fe9b574..7bd6bcc267 100644
> --- a/tests/intel/xe_pm_residency.c
> +++ b/tests/intel/xe_pm_residency.c
> @@ -282,10 +282,14 @@ static void measure_power(struct igt_power *gpu, double *power)
>   static void toggle_gt_c6(int fd, int n)
>   {
>   	double gt_c0_power, gt_c6_power;
> -	int gt;
> +	int gt, ret;
>   	struct igt_power gpu;
>   
> -	igt_power_open(fd, &gpu, "gpu");
> +	/*
> +	 * igt_power_get_mW will always return 0 if igt_power_open fails,
> +	 * so skip the power check in this case.
> +	 */
> +	ret = igt_power_open(fd, &gpu, "gpu");
>   
>   	do {
>   		fw_handle = igt_debugfs_open(fd, "forcewake_all", O_RDONLY);
> @@ -312,7 +316,7 @@ static void toggle_gt_c6(int fd, int n)
>   	igt_info("GPU consumed %fmW in GT C6 and %fmW in GT C0\n", gt_c6_power, gt_c0_power);
>   
>   	/* FIXME: Remove dgfx check after hwmon is added */
> -	if (!xe_has_vram(fd))
> +	if (!(xe_has_vram(fd) || ret))
>   		igt_assert_f(gt_c6_power < gt_c0_power,
>   			     "Power consumed in GT C6 should be lower than GT C0\n");
>   }


      parent reply	other threads:[~2024-11-19  6:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-23 21:58 [PATCH v3] tests/intel/xe_pm_residency: Skip on igt_power_open failure Jonathan Cavitt
2024-10-24  6:52 ` ✓ Fi.CI.BAT: success for tests/intel/xe_pm_residency: Skip on igt_power_open failure (rev4) Patchwork
2024-10-24  7:50 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-10-24  8:13 ` ✓ CI.xeBAT: success " Patchwork
2024-10-24 13:11 ` ✓ CI.xeFULL: " Patchwork
2024-11-19  6:41 ` Riana Tauro [this message]

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=0886a572-3c7a-4706-86f3-140b5e183cb3@intel.com \
    --to=riana.tauro@intel.com \
    --cc=alex.zuo@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=saurabhg.gupta@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