[igt-dev] [PATCH i-g-t v1 4/6] [intel-gfx][intel-dev] tests/pm_dc : This patch adds test to validate DC6 on SKL. DC6 on SKL is achieved with RPM enabled and DPMS OFF sequence.

Yadav, Jyoti R jyoti.r.yadav at intel.com
Wed Oct 3 04:37:27 UTC 2018



On 10/2/2018 7:06 PM, Imre Deak wrote:
> On Wed, Sep 26, 2018 at 11:59:21AM -0400, Jyoti Yadav wrote:
>> Signed-off-by: Jyoti Yadav <jyoti.r.yadav at intel.com>
>> ---
>>   tests/pm_dc.c | 21 +++++++++++++++++++++
>>   1 file changed, 21 insertions(+)
>>
>> diff --git a/tests/pm_dc.c b/tests/pm_dc.c
>> index b609fad..0f18ece 100644
>> --- a/tests/pm_dc.c
>> +++ b/tests/pm_dc.c
>> @@ -146,6 +146,18 @@ static uint32_t read_dc5_dc6_counter(uint32_t dev_id)
>>   	return dc5_dc6_count;
>>   }
>>   
>> +static void dpms_off_on(data_t *data)
>> +{
>> +	for (int i = 0; i < data->display.n_outputs; i++) {
>> +		kmstest_set_connector_dpms(data->drm_fd, data->display.outputs[i].config.connector,
>> +					   DRM_MODE_DPMS_OFF);
>> +	}
>> +	for (int i = 0; i < data->display.n_outputs; i++) {
>> +		kmstest_set_connector_dpms(data->drm_fd, data->display.outputs[i].config.connector,
>> +				   DRM_MODE_DPMS_ON);
>> +	}
> Again, not sure if it's guaranteed that the residency counter will
> increase with instant off/on, probably we'd need to wait for the
> increment with a timeout.

while doing some basic testing on SKL, I could see that residency 
counters were increasing. So no need to go for timeout.
>
>> +}
>> +
>>   static void test_dc5(data_t *data)
>>   {
>>   	uint32_t dc3_dc5_counter_before_psr, dc3_dc5_counter_after_psr;
>> @@ -162,6 +174,7 @@ int main(int argc, char *argv[])
>>   {
>>   	data_t data = {};
>>   	uint32_t dc5_dc6_counter_before_psr, dc5_dc6_counter_after_psr;
>> +	uint32_t dc5_dc6_counter_before_suspend, dc5_dc6_counter_after_resume;
> It's not really suspend/resume and I don't think you need separate vars
> for each subtest.
ok , Will keep one set of variable with shorter name.
>
>>   
>>   	igt_skip_on_simulation();
>>   	igt_fixture {
>> @@ -193,6 +206,14 @@ int main(int argc, char *argv[])
>>   				"DC6 State is not achieved\n");
>>   		cleanup(&data);
>>   	}
>> +	igt_subtest("DC6_state_on_gen9") {
> This isn't GEN9 specific, so could be called dc6-dpms-off. I suppose you
> also want a dc5-dpms-off test.
AS on Gen9,  (I am sure about SKL, not sure about other Gen9 platforms), 
on SKL, DC6 is achieved with DPMS off. but on Gen 11, DC6 is achieved 
with PSR. That's why i named test like "Dc6_state_on_gen9" and 
"Dc6_state_on_gen11".
Also on Gen9, DC5 is mainly achieved with PSR, on DPMS off directly we 
can enter into DC6. So in case of DPMS off scenario, i was mainly 
checking Dc6 counter, instead of checking DC5 and Dc6 counters both.
>
>> +		dc5_dc6_counter_before_suspend = read_dc5_dc6_counter(data.devid);
>> +		dpms_off_on(&data);
>> +		dc5_dc6_counter_after_resume = read_dc5_dc6_counter(data.devid);
>> +		igt_require_f(dc5_dc6_counter_after_resume > dc5_dc6_counter_before_suspend,
>> +				"DC6 State is not achieved\n");
>> +		cleanup(&data);
>> +	}
>>   	igt_fixture {
>>   		psr_disable(data.debugfs_fd);
>>   		close(data.debugfs_fd);
>> -- 
>> 2.7.4
>>



More information about the igt-dev mailing list