Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Naladala, Ramanaidu" <ramanaidu.naladala@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	<igt-dev@lists.freedesktop.org>, <jeevan.b@intel.com>,
	<suraj.kandpal@intel.com>
Subject: Re: [PATCH i-g-t 2/3] tests/intel/kms_pm_dc: Update deep-pkgc function
Date: Fri, 19 Jul 2024 15:01:24 +0530	[thread overview]
Message-ID: <5725b42c-63ed-4963-9384-028349e839f3@intel.com> (raw)
In-Reply-To: <20240717153101.v4kddn4v7jlvzkpm@kamilkon-DESK.igk.intel.com>



On 7/17/2024 9:01 PM, Kamil Konieczny wrote:
> Hi Naladala,
> On 2024-07-17 at 19:35:55 +0530, Naladala Ramanaidu wrote:
>> Increased the C-state polling time from its previous value
> 
> Why?
Certain features can prevent timely entry into the C10 state, causing 
inconsistent results. So increase test time to get accurate results.

> 
>> to 4 sec.Implement polling for PKG-C10 counters for every
> 
> Add space after dot '.', s/sec.Implement/sec. Implement/
> 
>> 5ms up to 16ms.
> 
> Same here, write why you need this change.
> 
> Also, imho you should split this into two patches and update subjects:
Sure Kamil. In next rev i will split into two patches.
> 
> [PATCH i-g-t 2/4] tests/intel/kms_pm_dc: Increase C-state polling
> 
> [PATCH i-g-t 3/4] tests/intel/kms_pm_dc: Add polling for deep-pkgc
> 
> Regards,
> Kamil
> 
>>
>> v2: Address and correct review comments (Suraj, Jeevan)
>>
>> Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala@intel.com>
>> ---
>>   tests/intel/kms_pm_dc.c | 18 +++++++++++-------
>>   1 file changed, 11 insertions(+), 7 deletions(-)
>>
>> diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
>> index 8fb35a2df..c1ca3acc0 100644
>> --- a/tests/intel/kms_pm_dc.c
>> +++ b/tests/intel/kms_pm_dc.c
>> @@ -592,7 +592,7 @@ static unsigned int read_pkgc_counter(int debugfs_root_fd)
>>   static void test_deep_pkgc_state(data_t *data)
>>   {
>>   	unsigned int pre_val = 0, cur_val = 0;
>> -	time_t start = time(NULL), duration = 2, vb_delay, delay;
>> +	time_t start = time(NULL), duration = 4, vb_delay, delay;
>>   	enum pipe pipe;
>>   	bool pkgc_flag = false;
>>   	bool flip = true;
>> @@ -623,10 +623,10 @@ static void test_deep_pkgc_state(data_t *data)
>>   		data->mode = &output->config.connector->modes[j__];
>>   		vb_delay = 1 * (MSECS / (data->mode->vrefresh));
>>   		/*
>> -		 * At least 5ms vblank time required to program higher
>> +		 * At least 5ms vblank time for programming higher
>>   		 * watermark levels
>>   		 */
>> -		if (vb_delay > (5 * MSEC))
>> +		if (vb_delay > (5 * MSECS))
>>   			break;
>>   	}
>>   
>> @@ -635,23 +635,27 @@ static void test_deep_pkgc_state(data_t *data)
>>   	setup_videoplayback(data);
>>   
>>   	primary = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_PRIMARY);
>> -	pre_val = read_pkgc_counter(data->debugfs_root_fd);
>> -	delay = 1 * (MSECS / (data->mode->vrefresh - 10));
>> +	delay = vb_delay * 0.5;
>>   
>>   	igt_plane_set_fb(primary, &data->fb_rgb);
>>   	igt_display_commit(&data->display);
>>   
>> +	/* Waiting for the vblank to sync the frame time */
>> +	igt_wait_for_vblank_count(data->drm_fd, data->display.pipes[pipe].crtc_offset, 1);
>> +	usleep(delay);
>> +	pre_val = read_pkgc_counter(data->debugfs_root_fd);
>> +
>>   	while (time(NULL) - start < duration) {
>>   		flip = !flip;
>>   		igt_plane_set_fb(primary, flip ? &data->fb_rgb : &data->fb_rgr);
>>   		igt_display_commit(&data->display);
>>   
>> -		cur_val = read_pkgc_counter(data->debugfs_root_fd);
>> +		igt_wait((cur_val = read_pkgc_counter(data->debugfs_root_fd)) > pre_val,
>> +			  vb_delay * 2, 5);
>>   		if (cur_val > pre_val) {
>>   			pkgc_flag = true;
>>   			break;
>>   		}
>> -		usleep(delay);
>>   	}
>>   
>>   	cleanup_dc3co_fbs(data);
>> -- 
>> 2.43.0
>>

  reply	other threads:[~2024-07-19  9:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-17 14:05 [PATCH i-g-t 0/3] Improvise-the-deep-pkgc Naladala Ramanaidu
2024-07-17 14:05 ` [PATCH i-g-t 1/3] tests/intel/kms_pm_dc:Add basic validation checks to achieve deep-pkgc Naladala Ramanaidu
2024-07-17 15:26   ` Kamil Konieczny
2024-07-19  9:09     ` Naladala, Ramanaidu
2024-07-17 14:05 ` [PATCH i-g-t 2/3] tests/intel/kms_pm_dc: Update deep-pkgc function Naladala Ramanaidu
2024-07-17 15:31   ` Kamil Konieczny
2024-07-19  9:31     ` Naladala, Ramanaidu [this message]
2024-07-17 14:05 ` [PATCH i-g-t 3/3] HAX patch do not merge Naladala Ramanaidu
2024-07-17 15:39 ` ✓ CI.xeBAT: success for Improvise-the-deep-pkgc (rev2) Patchwork
2024-07-17 15:41 ` ✗ GitLab.Pipeline: warning " Patchwork
2024-07-17 16:00 ` ✓ Fi.CI.BAT: success " Patchwork
2024-07-17 21:24 ` ✗ CI.xeFULL: failure " Patchwork
2024-07-18  6:38 ` ✗ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-07-17 14:02 [PATCH i-g-t 0/3] tests/intel/kms_pm_dc: Improvise the deep-pkgc Naladala Ramanaidu
2024-07-17 14:02 ` [PATCH i-g-t 2/3] tests/intel/kms_pm_dc: Update deep-pkgc function Naladala Ramanaidu

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=5725b42c-63ed-4963-9384-028349e839f3@intel.com \
    --to=ramanaidu.naladala@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jeevan.b@intel.com \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=suraj.kandpal@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