Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Riana Tauro <riana.tauro@intel.com>
To: "Gupta, Anshuman" <anshuman.gupta@intel.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Cc: "Nilawar, Badal" <badal.nilawar@intel.com>,
	"Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/xe: Add a test that validates GT C0 on exec
Date: Mon, 24 Jul 2023 10:42:44 +0530	[thread overview]
Message-ID: <75b81eb1-c5c6-1e13-a613-307661448694@intel.com> (raw)
In-Reply-To: <CY5PR11MB6211B99539C0E65F73CD4081953FA@CY5PR11MB6211.namprd11.prod.outlook.com>


Hi Anshuman

On 7/21/2023 2:52 PM, Gupta, Anshuman wrote:
> 
> 
>> -----Original Message-----
>> From: Tauro, Riana <riana.tauro@intel.com>
>> Sent: Thursday, July 20, 2023 10:00 AM
>> To: igt-dev@lists.freedesktop.org
>> Cc: Tauro, Riana <riana.tauro@intel.com>; Gupta, Anshuman
>> <anshuman.gupta@intel.com>; Dixit, Ashutosh <ashutosh.dixit@intel.com>;
>> Belgaumkar, Vinay <vinay.belgaumkar@intel.com>; Nilawar, Badal
>> <badal.nilawar@intel.com>; kamil.konieczny@linux.intel.com
>> Subject: [PATCH i-g-t] tests/xe: Add a test that validates GT C0 on exec
>>
>> Add a test that validates if GT is in C0 while running a spinner on an engine of
>> the gt
> We should have a test as well to test opportunistic RC6 during workload execution ?
> This is a negative test, not sure if this is going to fail.
This is a replacement for rc0_on_exec from 
https://patchwork.freedesktop.org/patch/544388/?series=119910&rev=1.

Due to the path change, moved this test here and used spinner.
Should i drop this test?

Thanks
Riana
> Br,
> Anshuman.
>>
>> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
>> ---
>>   tests/xe/xe_pm_residency.c | 39
>> ++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 39 insertions(+)
>>
>> diff --git a/tests/xe/xe_pm_residency.c b/tests/xe/xe_pm_residency.c
>> index a20c4449c..7614af761 100644
>> --- a/tests/xe/xe_pm_residency.c
>> +++ b/tests/xe/xe_pm_residency.c
>> @@ -14,6 +14,7 @@
>>   #include "igt.h"
>>   #include "igt_sysfs.h"
>>
>> +#include "xe/xe_ioctl.h"
>>   #include "xe/xe_query.h"
>>
>>   #define SLEEP_DURATION 3000 /* in milliseconds */ @@ -76,6 +77,38 @@
>> static unsigned long read_idle_residency(int fd, int gt)
>>   	return residency;
>>   }
>>
>> +/**
>> + * SUBTEST: gt-c0-on-exec
>> + * Description: Validate if GT is in C0 while running a spinner
>> + *		on an engine of that GT
>> + * Run type: FULL
>> + */
>> +static void test_c0_exec(int fd, struct drm_xe_engine_class_instance
>> +*hwe) {
>> +	uint64_t ahnd;
>> +	unsigned int engine;
>> +	uint32_t vm;
>> +	igt_spin_t *spin;
>> +
>> +	/* Start with GT in C6 */
>> +	igt_assert_f(igt_wait(is_gt_in_c6(fd, hwe->gt_id), 1000, 1), "GT is
>> +not in C6\n");
>> +
>> +	igt_debug("Run on engine: %s:%d\n",
>> +		  xe_engine_class_string(hwe->engine_class), hwe-
>>> engine_instance);
>> +	vm = xe_vm_create(fd, 0, 0);
>> +	engine = xe_engine_create(fd, vm, hwe, 0);
>> +	ahnd = intel_allocator_open(fd, 0, INTEL_ALLOCATOR_RELOC);
>> +	spin = igt_spin_new(fd, .ahnd = ahnd, .engine = engine, .vm = vm);
>> +
>> +	/* GT should be in C0 when busy */
>> +	igt_assert_f(!is_gt_in_c6(fd, hwe->gt_id), "GT in C6\n");
>> +
>> +	igt_spin_free(fd, spin);
>> +	put_ahnd(ahnd);
>> +	xe_engine_destroy(fd, engine);
>> +	xe_vm_destroy(fd, vm);
>> +}
>> +
>>   /**
>>    * SUBTEST: idle-residency
>>    * Description: basic residency test to validate idle residency @@ -101,12
>> +134,18 @@ static void test_idle_residency(int fd, int gt)  igt_main  {
>>   	int fd, gt;
>> +	struct drm_xe_engine_class_instance *hwe;
>>
>>   	igt_fixture {
>>   		fd = drm_open_driver(DRIVER_XE);
>>   		igt_require(!IS_PONTEVECCHIO(xe_dev_id(fd)));
>>   	}
>>
>> +	igt_describe("Validate GT C0 on exec");
>> +	igt_subtest("gt-c0-on-exec")
>> +		xe_for_each_hw_engine(fd, hwe)
>> +			test_c0_exec(fd, hwe);
>> +
>>   	igt_describe("Validate GT C6 on idle");
>>   	igt_subtest("gt-c6-on-idle")
>>   		xe_for_each_gt(fd, gt)
>> --
>> 2.40.0
> 

  reply	other threads:[~2023-07-24  5:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20  4:30 [igt-dev] [PATCH i-g-t] tests/xe: Add a test that validates GT C0 on exec Riana Tauro
2023-07-20  5:45 ` [igt-dev] ○ CI.xeBAT: info for " Patchwork
2023-07-20  5:49 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-07-20  9:32 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-07-21  9:22 ` [igt-dev] [PATCH i-g-t] " Gupta, Anshuman
2023-07-24  5:12   ` Riana Tauro [this message]
2023-07-24  6:55     ` Gupta, Anshuman
2023-07-26 11:34       ` Riana Tauro

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=75b81eb1-c5c6-1e13-a613-307661448694@intel.com \
    --to=riana.tauro@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@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