replace hardcode of PSR state and drop psr state check for PSR-SU MPO test
cover replace hardcode of PSR state and drop psr state check for PSR-SU MPO test
David Zhang (2):
tests/amdgpu/amd_psr: use PSR state enum replace the integer tests/amdgpu/amd_psr: drop the PSR state check for PSR-SU MPO test
tests/amdgpu/amd_psr.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/2 tests/amdgpu/amd_psr: use PSR state enum replace the integer
[why & how]
The enum of AMDGPU PSR STATE may update along the time and should be aligned to the code base of upstream. Instead of using hard- coded integer, replace them with enum PSR_STATE would be preferred and we only need to update the PSR_STATE enum if needed in the future.
--- tests/amdgpu/amd_psr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/amdgpu/amd_psr.c +4 -4
@@ -179,10 +179,10 @@ static void run_check_psr(data_t *data, bool test_null_crtc) {continue ; psr_state =igt_amd_read_psr_state (data->fd, output->name); -igt_fail_on_f (psr_state <0 ,"Open PSR state debugfs failed\n" ); -igt_fail_on_f (psr_state <1 ,"PSR was not enabled for connector %s\n" , output->name); -igt_fail_on_f (psr_state ==0xff ,"PSR is invalid for connector %s\n" , output->name); -igt_fail_on_f (psr_state !=5 ,"PSR state is expected to be at 5 on a " +igt_fail_on_f (psr_state <PSR_STATE0 ,"Open PSR state debugfs failed\n" ); +igt_fail_on_f (psr_state <PSR_STATE1 ,"PSR was not enabled for connector %s\n" , output->name); +igt_fail_on_f (psr_state ==PSR_STATE_INVALID ,"PSR is invalid for connector %s\n" , output->name); +igt_fail_on_f (psr_state !=PSR_STATE3 ,"PSR state is expected to be at PSR_STATE3 (Active) on a " "static screen for connector %s\n" , output->name); }
Signature · 1 line
2.25.1
Re: [igt-dev] [PATCH 1/2] tests/amdgpu/amd_psr: use PSR state enum replace the integer
[AMD Official Use Only]
--
Regards,
Jay
________________________________
From: Zhang, Dingchen (David) <[email protected]>
Sent: Wednesday, April 6, 2022 4:28 PM
To: [email protected] <[email protected]>
Cc: Siqueira, Rodrigo <[email protected]>; Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Lin, Wayne <[email protected]>
Subject: [PATCH 1/2] tests/amdgpu/amd_psr: use PSR state enum replace the integer
[why & how]
The enum of AMDGPU PSR STATE may update along the time and should be aligned to the code base of upstream. Instead of using hard- coded integer, replace them with enum PSR_STATE would be preferred and we only need to update the PSR_STATE enum if needed in the future.
--- tests/amdgpu/amd_psr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/amdgpu/amd_psr.c +4 -4
@@ -179,10 +179,10 @@ static void run_check_psr(data_t *data, bool test_null_crtc) {continue ; psr_state =igt_amd_read_psr_state (data->fd, output->name); -igt_fail_on_f (psr_state <0 ,"Open PSR state debugfs failed\n" ); -igt_fail_on_f (psr_state <1 ,"PSR was not enabled for connector %s\n" , output->name); -igt_fail_on_f (psr_state ==0xff ,"PSR is invalid for connector %s\n" , output->name); -igt_fail_on_f (psr_state !=5 ,"PSR state is expected to be at 5 on a " +igt_fail_on_f (psr_state <PSR_STATE0 ,"Open PSR state debugfs failed\n" ); +igt_fail_on_f (psr_state <PSR_STATE1 ,"PSR was not enabled for connector %s\n" , output->name); +igt_fail_on_f (psr_state ==PSR_STATE_INVALID ,"PSR is invalid for connector %s\n" , output->name); +igt_fail_on_f (psr_state !=PSR_STATE3 ,"PSR state is expected to be at PSR_STATE3 (Active) on a " "static screen for connector %s\n" , output->name); }
--
2.25.1
PATCH 2/2 tests/amdgpu/amd_psr: drop the PSR state check for PSR-SU MPO test
In reply to David Zhang[why & how]
Currently the enablement of PSR-SU for Linux kernel is still WIP and the PSR state to check for PSR-SU MPO is not upstreamed yet. In addition, all the PSR-SU test case currently by default is validated with visual confirm.
Drop the PSR state check in MPO PSR-SU sub-test case in the loop.
--- tests/amdgpu/amd_psr.c | 12 ------------ 1 file changed, 12 deletions(-)
tests/amdgpu/amd_psr.c +0 -12
@@ -292,18 +292,6 @@ static void run_check_psr_su_mpo(data_t *data) flip_fb->fb_id, DRM_MODE_PAGE_FLIP_EVENT, NULL);igt_require (ret ==0 );kmstest_wait_for_pageflip (data->fd); - -/* check PSR state */ -if (i >PSR_SETTLE_DELAY * frame_rate) { - psr_state =igt_amd_read_psr_state (data->fd, data->output->name); -igt_fail_on_f (psr_state <0 ,"Open PSR state debugfs failed\n" ); -igt_fail_on_f (psr_state ==PSR_STATE0 , -"PSR was not enabled for connector %s\n" , data->output->name); -igt_fail_on_f (psr_state ==PSR_STATE_INVALID , -"PSR is invalid for connector %s\n" , data->output->name); -igt_fail_on_f (psr_state !=PSR_STATE3 , -"PSR state is expected to be STATE_3 for connector %s\n" , data->output->name); - } }/* fini */
Signature · 1 line
2.25.1
Re: [igt-dev] [PATCH 2/2] tests/amdgpu/amd_psr: drop the PSR state check for PSR-SU MPO test
[AMD Official Use Only]
--
Regards,
Jay
________________________________
From: Zhang, Dingchen (David) <[email protected]>
Sent: Wednesday, April 6, 2022 4:28 PM
To: [email protected] <[email protected]>
Cc: Siqueira, Rodrigo <[email protected]>; Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Lin, Wayne <[email protected]>
Subject: [PATCH 2/2] tests/amdgpu/amd_psr: drop the PSR state check for PSR-SU MPO test
[why & how]
Currently the enablement of PSR-SU for Linux kernel is still WIP and the PSR state to check for PSR-SU MPO is not upstreamed yet. In addition, all the PSR-SU test case currently by default is validated with visual confirm.
Drop the PSR state check in MPO PSR-SU sub-test case in the loop.
--- tests/amdgpu/amd_psr.c | 12 ------------ 1 file changed, 12 deletions(-)
tests/amdgpu/amd_psr.c +0 -12
@@ -292,18 +292,6 @@ static void run_check_psr_su_mpo(data_t *data) flip_fb->fb_id, DRM_MODE_PAGE_FLIP_EVENT, NULL);igt_require (ret ==0 );kmstest_wait_for_pageflip (data->fd); - -/* check PSR state */ -if (i >PSR_SETTLE_DELAY * frame_rate) { - psr_state =igt_amd_read_psr_state (data->fd, data->output->name); -igt_fail_on_f (psr_state <0 ,"Open PSR state debugfs failed\n" ); -igt_fail_on_f (psr_state ==PSR_STATE0 , -"PSR was not enabled for connector %s\n" , data->output->name); -igt_fail_on_f (psr_state ==PSR_STATE_INVALID , -"PSR is invalid for connector %s\n" , data->output->name); -igt_fail_on_f (psr_state !=PSR_STATE3 , -"PSR state is expected to be STATE_3 for connector %s\n" , data->output->name); - } }/* fini */
--
2.25.1
Patchwork
CI[igt-dev] ✗ Fi.CI.BUILD: failure for replace hardcode of PSR state and drop psr state check for PSR-SU MPO test (rev3)
In reply to David Zhang== Series Details ==
== Series Details ==
Series: replace hardcode of PSR state and drop psr state check for PSR-SU MPO test (rev3)
URL : https://patchwork.freedesktop.org/series/102297/
State : failure
== Summary ==
Applying: tests/amdgpu/amd_psr: use PSR state enum replace the integer Using index info to reconstruct a base tree...
M tests/amdgpu/amd_psr.c
Patch failed at 0001 tests/amdgpu/amd_psr: use PSR state enum replace the integer When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".