Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Poosa, Karthik" <karthik.poosa@intel.com>
To: Riana Tauro <riana.tauro@intel.com>, <igt-dev@lists.freedesktop.org>
Cc: <anshuman.gupta@intel.com>, <badal.nilawar@intel.com>,
	<rodrigo.vivi@intel.com>, <vinay.belgaumkar@intel.com>
Subject: Re: [PATCH i-g-t] tests/intel/xe_gt_freq: Add a wait after gt reset
Date: Thu, 1 Aug 2024 11:50:51 +0530	[thread overview]
Message-ID: <90a2332e-5920-469b-820c-9c477b59b7c9@intel.com> (raw)
In-Reply-To: <122f5ae7-9b39-4e8b-9fe5-2ea57f72cc4f@intel.com>


On 31-07-2024 16:06, Riana Tauro wrote:
> Hi Karthik
>
> On 7/30/2024 5:20 PM, Karthik Poosa wrote:
>> After reset min and max takes sometime to get set to rpn.
>> So add a wait of 100ms after gt reset before reading
>> min and max frequencies.
>>
>> Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
>> ---
>>   tests/intel/xe_gt_freq.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/tests/intel/xe_gt_freq.c b/tests/intel/xe_gt_freq.c
>> index 93ebb5ed0..718f720c0 100644
>> --- a/tests/intel/xe_gt_freq.c
>> +++ b/tests/intel/xe_gt_freq.c
>> @@ -33,6 +33,12 @@
>>    */
>>   #define ACT_FREQ_LATENCY_US 100000
>>   +/*
>> + * After gt reset, min and max freq may take sometime to set to rpn.
>> + * So adding a wait of 100ms after reset.
>> + */
>> +#define GT_RESET_FREQ_LATENCY_US 100000
>
> Both ACT_FREQ_LATENCY_US  and  GT_RESET_FREQ_LATENCY_US  are same values.
>
> Why not rename ACT_FREQ_LATENCY_US to LATENCY_US and use that instead?

ACT_FREQ_LATENCY_US is used between set_freq and get freq without gt 
reset in between.

GT_RESET_FREQ_LATENCY_US is delay after reset, so kept it as a separate 
macro.

>
> Thanks,
> Riana
>> +
>>   static int set_freq(int fd, int gt_id, const char *freq_name, 
>> uint32_t freq)
>>   {
>>       int ret = -EAGAIN;
>> @@ -318,6 +324,7 @@ static void test_reset(int fd, int gt_id, int 
>> cycles)
>>                    "Failed after %d good cycles\n", i);
>>             xe_force_gt_reset_async(fd, gt_id);
>> +        usleep(GT_RESET_FREQ_LATENCY_US);
>>             igt_assert_f(get_freq(fd, gt_id, "min") == rpn,
>>                    "Failed after %d good cycles\n", i);

  reply	other threads:[~2024-08-01  6:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 11:50 [PATCH i-g-t] tests/intel/xe_gt_freq: Add a wait after gt reset Karthik Poosa
2024-07-30 14:27 ` ✓ CI.xeBAT: success for " Patchwork
2024-07-30 14:40 ` ✓ Fi.CI.BAT: " Patchwork
2024-07-30 15:53 ` ✗ CI.xeFULL: failure " Patchwork
2024-07-31  1:06 ` ✗ Fi.CI.IGT: " Patchwork
2024-07-31 10:36 ` [PATCH i-g-t] " Riana Tauro
2024-08-01  6:20   ` Poosa, Karthik [this message]
2024-08-01  7:22     ` Riana Tauro
2024-08-02  7:32       ` Poosa, Karthik

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=90a2332e-5920-469b-820c-9c477b59b7c9@intel.com \
    --to=karthik.poosa@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@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