Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nilawar, Badal" <badal.nilawar@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	<igt-dev@lists.freedesktop.org>, <vinay.belgaumkar@intel.com>
Subject: Re: [PATCH i-g-t v2] tests/intel/xe_gt_freq: Resolve freq_low_max test
Date: Thu, 20 Jun 2024 17:37:19 +0530	[thread overview]
Message-ID: <f2004ac5-7583-493e-af79-5e18f3c95f6c@intel.com> (raw)
In-Reply-To: <20240618114833.zpfs2vds24kqdfds@kamilkon-DESK.igk.intel.com>



On 18-06-2024 17:18, Kamil Konieczny wrote:
> Hi Badal,
> On 2024-06-14 at 23:05:20 +0530, Badal Nilawar wrote:
>> In GUCPC flow when max freq is less than min freq and min freq is greater
>> than rpe then cur will be set to min.
>>
>> By nature rpe is variable as pcode changes it as per its calculations.
>> So for above scenario when rpe is greater than min then GUCPC will set cur
>> to rpe.
>>
>> To validate GUCPC behaving as expected it is enough to check cur freq.
>>
>> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1045
>> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1829
>> Fixes: 1a1e668e774e ("tests/intel/xe_gt_freq: Fix freq_low_max test")
>> Fixes: adcc68266b8e ("tests/intel/xe_gt_freq: Check for RPe freq updates")
>> Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
>> Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
>> ---
>>   tests/intel/xe_gt_freq.c | 13 ++++++++++---
>>   1 file changed, 10 insertions(+), 3 deletions(-)
>>
>> diff --git a/tests/intel/xe_gt_freq.c b/tests/intel/xe_gt_freq.c
>> index d2e4d1a09..664ea3f79 100644
>> --- a/tests/intel/xe_gt_freq.c
>> +++ b/tests/intel/xe_gt_freq.c
>> @@ -264,6 +264,7 @@ static void test_freq_low_max(int fd, int gt_id)
>>   {
>>   	uint32_t rpn = get_freq(fd, gt_id, "rpn");
>>   	uint32_t rpe = get_freq(fd, gt_id, "rpe");
>> +	uint32_t min;
>>   
>>   	/*
>>   	 *  When max request < min request, max is ignored and min works like
>> @@ -276,10 +277,16 @@ static void test_freq_low_max(int fd, int gt_id)
>>   	/* Refresh value of rpe, pcode could have adjusted it */
>>   	rpe = get_freq(fd, gt_id, "rpe");
>>   
>> -	igt_assert(get_freq(fd, gt_id, "cur") == rpe);
>> +	min = get_freq(fd, gt_id, "min");
>>   
>> -	if (!xe_is_gt_in_c6(fd, gt_id))
> 
> Why did you dropped this check? Please write about this
> in description,
Sure.
Removed this check as there is possible race. We check gt idle status 
first and then act freq. By the time of checking act frequency GT may 
get transitioned to C6.
I will float separate patch for this.

> 
> Regards,
> Kamil
> 
>> -		igt_assert(get_freq(fd, gt_id, "act") == rpe);
>> +	/*
>> +	 * Refreshed value of rpe can be lesser or greater than min (previous rpe).
>> +	 * So when rpe < min then cur = min else cur = rpe
>> +	 */
>> +	if (rpe < min)
>> +		igt_assert(get_freq(fd, gt_id, "cur") == min);
>> +	else
>> +		igt_assert(get_freq(fd, gt_id, "cur") == rpe);
>>   }
>>   
>>   /**
>> -- 
>> 2.34.1
>>

  reply	other threads:[~2024-06-20 12:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14 17:35 [PATCH i-g-t v2] tests/intel/xe_gt_freq: Resolve freq_low_max test Badal Nilawar
2024-06-14 17:55 ` ✓ CI.xeBAT: success for " Patchwork
2024-06-14 17:59 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-06-15  5:27 ` ✓ CI.xeFULL: success " Patchwork
2024-06-18 11:48 ` [PATCH i-g-t v2] " Kamil Konieczny
2024-06-20 12:07   ` Nilawar, Badal [this message]
2024-06-20 18:12 ` Belgaumkar, Vinay

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=f2004ac5-7583-493e-af79-5e18f3c95f6c@intel.com \
    --to=badal.nilawar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=vinay.belgaumkar@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