Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nilawar, Badal" <badal.nilawar@intel.com>
To: "Gupta, Anshuman" <anshuman.gupta@intel.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH i-g-t 2/2] tests/intel/xe_gt_freq: Skip GuC PC tests if SLPC not enabled
Date: Thu, 18 Jan 2024 22:52:15 +0530	[thread overview]
Message-ID: <27f5edf9-c19d-49fc-8b58-50e97d019559@intel.com> (raw)
In-Reply-To: <CY5PR11MB6211CBD9D475EE9E5A0911C395712@CY5PR11MB6211.namprd11.prod.outlook.com>



On 18-01-2024 21:40, Gupta, Anshuman wrote:
> 
> 
>> -----Original Message-----
>> From: Nilawar, Badal <badal.nilawar@intel.com>
>> Sent: Thursday, January 18, 2024 8:27 PM
>> To: igt-dev@lists.freedesktop.org
>> Cc: Roper, Matthew D <matthew.d.roper@intel.com>; Gupta, Anshuman
>> <anshuman.gupta@intel.com>; Dixit, Ashutosh <ashutosh.dixit@intel.com>;
>> Belgaumkar, Vinay <vinay.belgaumkar@intel.com>
>> Subject: [PATCH i-g-t 2/2] tests/intel/xe_gt_freq: Skip GuC PC tests if SLPC not
>> enabled
>>
>> Skip GuC PC tests if SLPC is disabled
>>
>> Fixes: acaaca0bf317 ("tests/xe: Add Xe IGT tests")
>> Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
>> ---
>>   tests/intel/xe_gt_freq.c | 28 ++++++++++++++++++++++++++++
>>   1 file changed, 28 insertions(+)
>>
>> diff --git a/tests/intel/xe_gt_freq.c b/tests/intel/xe_gt_freq.c index
>> bf63e4298..853720297 100644
>> --- a/tests/intel/xe_gt_freq.c
>> +++ b/tests/intel/xe_gt_freq.c
>> @@ -20,6 +20,7 @@
>>   #include "xe/xe_query.h"
>>   #include "xe/xe_util.h"
>>
>> +#include <fcntl.h>
>>   #include <string.h>
>>   #include <sys/time.h>
>>
>> @@ -319,6 +320,30 @@ static void test_reset(int fd, int gt_id, int cycles)
>>   	}
>>   }
>>
>> +static bool xe_is_slpc_enabled_gt(int drm_fd, int gt) {
>> +	int gt_fd;
>> +	int freq_fd;
>> +
>> +	gt_fd = xe_sysfs_gt_open(drm_fd, gt);
>> +	igt_assert(gt_fd >= 0);
>> +
>> +	/*
>> +	 * When SLPC disabled xe kmd doesn't create sysfs freq entries
>> +	 * so its enough to check one of the entry present of not
>> +	 */
>> +	freq_fd = openat(gt_fd, "freq0/max_freq", O_RDONLY);
> 	This is not scalable  solution for future platform, which are not using slpc. Such platform can still support frequency telemetry.
In that case we should have new sysfs entry to check platform support SLPC.

Thanks,
Badal
> 	Thanks,
> 	Anshuman.
>> +
>> +	close(gt_fd);
>> +
>> +	if (freq_fd < 0)
>> +		return false;
>> +
>> +	close(freq_fd);
>> +
>> +	return true;
>> +}
>> +
>>   igt_main
>>   {
>>   	int fd;
>> @@ -329,6 +354,9 @@ igt_main
>>   	igt_fixture {
>>   		fd = drm_open_driver(DRIVER_XE);
>>
>> +		igt_skip_on_f(!xe_is_slpc_enabled_gt(fd, 0),
>> +			      "GuC PC tests are not supported when SLPC is
>> disabled\n");
>> +
>>   		/* The defaults are the same. Stashing the gt0 is enough */
>>   		stash_min = get_freq(fd, 0, "min");
>>   		stash_max = get_freq(fd, 0, "max");
>> --
>> 2.25.1
> 

  reply	other threads:[~2024-01-18 17:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18 14:56 [PATCH i-g-t 0/2] Couple of fixes to guc_pc tests Badal Nilawar
2024-01-18 14:56 ` [PATCH i-g-t 1/2] test/intel/xe_gt_freq: Fix freq_low_max test Badal Nilawar
2024-01-18 14:56 ` [PATCH i-g-t 2/2] tests/intel/xe_gt_freq: Skip GuC PC tests if SLPC not enabled Badal Nilawar
2024-01-18 16:10   ` Gupta, Anshuman
2024-01-18 17:22     ` Nilawar, Badal [this message]
2024-01-18 17:07 ` ✓ Fi.CI.BAT: success for Couple of fixes to guc_pc tests (rev2) Patchwork
2024-01-18 17:50 ` ✓ CI.xeBAT: " Patchwork
2024-01-18 19:31 ` ✗ Fi.CI.IGT: failure " 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=27f5edf9-c19d-49fc-8b58-50e97d019559@intel.com \
    --to=badal.nilawar@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=rodrigo.vivi@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