All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH 0/2] replace hardcode of PSR state and drop psr state check for PSR-SU MPO test
@ 2022-04-06 20:28 David Zhang
  2022-04-06 20:28 ` [igt-dev] [PATCH 1/2] tests/amdgpu/amd_psr: use PSR state enum replace the integer David Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: David Zhang @ 2022-04-06 20:28 UTC (permalink / raw)
  To: igt-dev


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(-)

-- 
2.25.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [igt-dev] [PATCH 1/2] tests/amdgpu/amd_psr: use PSR state enum replace the integer
  2022-04-06 20:28 [igt-dev] [PATCH 0/2] replace hardcode of PSR state and drop psr state check for PSR-SU MPO test David Zhang
@ 2022-04-06 20:28 ` David Zhang
  2022-04-06 20:38   ` Pillai, Aurabindo
  2022-04-06 20:28 ` [igt-dev] [PATCH 2/2] tests/amdgpu/amd_psr: drop the PSR state check for PSR-SU MPO test David Zhang
  2022-04-06 22:58 ` [igt-dev] ✗ Fi.CI.BUILD: failure for replace hardcode of PSR state and drop psr state check for PSR-SU MPO test (rev3) Patchwork
  2 siblings, 1 reply; 6+ messages in thread
From: David Zhang @ 2022-04-06 20:28 UTC (permalink / raw)
  To: igt-dev

[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.

Cc: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Jay Pillai <aurabindo.pillai@amd.com>
Cc: Wayne Lin <wayne.lin@amd.com>

Signed-off-by: David Zhang <dingchen.zhang@amd.com>
---
 tests/amdgpu/amd_psr.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/amdgpu/amd_psr.c b/tests/amdgpu/amd_psr.c
index d21d41e3..83e44c4e 100644
--- a/tests/amdgpu/amd_psr.c
+++ b/tests/amdgpu/amd_psr.c
@@ -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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [igt-dev] [PATCH 2/2] tests/amdgpu/amd_psr: drop the PSR state check for PSR-SU MPO test
  2022-04-06 20:28 [igt-dev] [PATCH 0/2] replace hardcode of PSR state and drop psr state check for PSR-SU MPO test David Zhang
  2022-04-06 20:28 ` [igt-dev] [PATCH 1/2] tests/amdgpu/amd_psr: use PSR state enum replace the integer David Zhang
@ 2022-04-06 20:28 ` David Zhang
  2022-04-06 20:38   ` Pillai, Aurabindo
  2022-04-06 22:58 ` [igt-dev] ✗ Fi.CI.BUILD: failure for replace hardcode of PSR state and drop psr state check for PSR-SU MPO test (rev3) Patchwork
  2 siblings, 1 reply; 6+ messages in thread
From: David Zhang @ 2022-04-06 20:28 UTC (permalink / raw)
  To: igt-dev

[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.

Cc: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Jay Pillai <aurabindo.pillai@amd.com>
Cc: Wayne Lin <wayne.lin@amd.com>

Signed-off-by: David Zhang <dingchen.zhang@amd.com>
---
 tests/amdgpu/amd_psr.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/tests/amdgpu/amd_psr.c b/tests/amdgpu/amd_psr.c
index 83e44c4e..8ea73080 100644
--- a/tests/amdgpu/amd_psr.c
+++ b/tests/amdgpu/amd_psr.c
@@ -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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [igt-dev] [PATCH 1/2] tests/amdgpu/amd_psr: use PSR state enum replace the integer
  2022-04-06 20:28 ` [igt-dev] [PATCH 1/2] tests/amdgpu/amd_psr: use PSR state enum replace the integer David Zhang
@ 2022-04-06 20:38   ` Pillai, Aurabindo
  0 siblings, 0 replies; 6+ messages in thread
From: Pillai, Aurabindo @ 2022-04-06 20:38 UTC (permalink / raw)
  To: Zhang, Dingchen (David), igt-dev

[-- Attachment #1: Type: text/plain, Size: 2521 bytes --]

[AMD Official Use Only]

Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>

--

Regards,
Jay
________________________________
From: Zhang, Dingchen (David) <Dingchen.Zhang@amd.com>
Sent: Wednesday, April 6, 2022 4:28 PM
To: igt-dev@lists.freedesktop.org <igt-dev@lists.freedesktop.org>
Cc: Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>
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.

Cc: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Jay Pillai <aurabindo.pillai@amd.com>
Cc: Wayne Lin <wayne.lin@amd.com>

Signed-off-by: David Zhang <dingchen.zhang@amd.com>
---
 tests/amdgpu/amd_psr.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/amdgpu/amd_psr.c b/tests/amdgpu/amd_psr.c
index d21d41e3..83e44c4e 100644
--- a/tests/amdgpu/amd_psr.c
+++ b/tests/amdgpu/amd_psr.c
@@ -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


[-- Attachment #2: Type: text/html, Size: 5379 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [igt-dev] [PATCH 2/2] tests/amdgpu/amd_psr: drop the PSR state check for PSR-SU MPO test
  2022-04-06 20:28 ` [igt-dev] [PATCH 2/2] tests/amdgpu/amd_psr: drop the PSR state check for PSR-SU MPO test David Zhang
@ 2022-04-06 20:38   ` Pillai, Aurabindo
  0 siblings, 0 replies; 6+ messages in thread
From: Pillai, Aurabindo @ 2022-04-06 20:38 UTC (permalink / raw)
  To: Zhang, Dingchen (David), igt-dev

[-- Attachment #1: Type: text/plain, Size: 2518 bytes --]

[AMD Official Use Only]

Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>

--

Regards,
Jay
________________________________
From: Zhang, Dingchen (David) <Dingchen.Zhang@amd.com>
Sent: Wednesday, April 6, 2022 4:28 PM
To: igt-dev@lists.freedesktop.org <igt-dev@lists.freedesktop.org>
Cc: Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>
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.

Cc: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Jay Pillai <aurabindo.pillai@amd.com>
Cc: Wayne Lin <wayne.lin@amd.com>

Signed-off-by: David Zhang <dingchen.zhang@amd.com>
---
 tests/amdgpu/amd_psr.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/tests/amdgpu/amd_psr.c b/tests/amdgpu/amd_psr.c
index 83e44c4e..8ea73080 100644
--- a/tests/amdgpu/amd_psr.c
+++ b/tests/amdgpu/amd_psr.c
@@ -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


[-- Attachment #2: Type: text/html, Size: 6031 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [igt-dev] ✗ Fi.CI.BUILD: failure for replace hardcode of PSR state and drop psr state check for PSR-SU MPO test (rev3)
  2022-04-06 20:28 [igt-dev] [PATCH 0/2] replace hardcode of PSR state and drop psr state check for PSR-SU MPO test David Zhang
  2022-04-06 20:28 ` [igt-dev] [PATCH 1/2] tests/amdgpu/amd_psr: use PSR state enum replace the integer David Zhang
  2022-04-06 20:28 ` [igt-dev] [PATCH 2/2] tests/amdgpu/amd_psr: drop the PSR state check for PSR-SU MPO test David Zhang
@ 2022-04-06 22:58 ` Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2022-04-06 22:58 UTC (permalink / raw)
  To: Pillai, Aurabindo; +Cc: igt-dev

== 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".


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-06 22:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06 20:28 [igt-dev] [PATCH 0/2] replace hardcode of PSR state and drop psr state check for PSR-SU MPO test David Zhang
2022-04-06 20:28 ` [igt-dev] [PATCH 1/2] tests/amdgpu/amd_psr: use PSR state enum replace the integer David Zhang
2022-04-06 20:38   ` Pillai, Aurabindo
2022-04-06 20:28 ` [igt-dev] [PATCH 2/2] tests/amdgpu/amd_psr: drop the PSR state check for PSR-SU MPO test David Zhang
2022-04-06 20:38   ` Pillai, Aurabindo
2022-04-06 22:58 ` [igt-dev] ✗ Fi.CI.BUILD: failure for replace hardcode of PSR state and drop psr state check for PSR-SU MPO test (rev3) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.