Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test
@ 2024-03-19  1:17 Hersen Wu
  0 siblings, 0 replies; 11+ messages in thread
From: Hersen Wu @ 2024-03-19  1:17 UTC (permalink / raw)
  To: igt-dev, rodrigo.siqueira, aurabindo.pillai, alex.hung,
	hamza.mahfooz, wayne.lin, sunpeng.li
  Cc: markyacoub, Hersen Wu

From: Hersen Wu <Hersenxs.Wu@amd.com>

At end of test, with disallow_edp_enter_psr = 0, run DPMS off, on
for eDP. This will trigger DRM kernel driver enable eDP PSR.

Signed-off-by: Hersen Wu <Hersenxs.Wu@amd.com>
---
 lib/igt_amd.c          |  5 ---
 tests/amdgpu/amd_ilr.c | 69 ++++++++++++++++++++++++++++++++++--------
 2 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/lib/igt_amd.c b/lib/igt_amd.c
index d0b53c08a..02ba8204a 100644
--- a/lib/igt_amd.c
+++ b/lib/igt_amd.c
@@ -1180,11 +1180,6 @@ void igt_amd_disallow_edp_enter_psr(int drm_fd, char *connector_name, bool enabl
 	const char *allow_edp_psr = "1";
 	const char *dis_allow_edp_psr = "0";
 
-	/* if current psr is not enabled, skip this debugfs */
-	if (!igt_amd_psr_support_drv(drm_fd, connector_name, PSR_MODE_1) &&
-		!igt_amd_psr_support_drv(drm_fd, connector_name, PSR_MODE_2))
-		return;
-
 	fd = igt_debugfs_connector_dir(drm_fd, connector_name, O_RDONLY);
 	igt_assert(fd >= 0);
 	ret = openat(fd, DEBUGFS_DISALLOW_EDP_ENTER_PSR, O_WRONLY);
diff --git a/tests/amdgpu/amd_ilr.c b/tests/amdgpu/amd_ilr.c
index 46ad6f60a..77e11aaad 100644
--- a/tests/amdgpu/amd_ilr.c
+++ b/tests/amdgpu/amd_ilr.c
@@ -199,28 +199,32 @@ static void test_flow(data_t *data, enum sub_test option)
 	igt_enable_connectors(data->drm_fd);
 
 	for_each_connected_output(&data->display, output) {
-		if (!igt_amd_output_has_ilr_setting(data->drm_fd, output->name) ||
+		if ((output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP) ||
+			!igt_amd_output_has_ilr_setting(data->drm_fd, output->name) ||
 			!igt_amd_output_has_link_settings(data->drm_fd, output->name)) {
 			igt_info("Skipping output: %s\n", output->name);
 			continue;
 		}
 
-		/* igt_amd_output_has_ilr_setting only checks if debugfs
-		 * exist. ilr settings could be all 0s -- not supported.
-		 * IGT needs to check if ilr settings values are supported.
-		 */
-		igt_amd_read_ilr_setting(data->drm_fd, output->name, data->supported_ilr);
-		if (data->supported_ilr[0] == 0)
-			continue;
-
 		igt_info("Testing on output: %s\n", output->name);
 
+		/* states under /sys/kernel/debug/dri/0/eDP-1:
+		 * psr_capability.driver_support (psr_en): yes
+		 * ilr_setting (ilr): yes/no
+		 * disallow_edp_enter_psr (dis_psr): no
+		 */
+
 		/* Init only if display supports ilr link settings */
 		test_init(data, output);
 
+		/* eDP is powered down within test_init
+		 * psr_en: yes; ilr: no; dis_psr: no
+		 */
+
 		/* Disable eDP PSR to avoid timeout when reading CRC */
 		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, true);
 
+		/* psr_en: yes; ilr: no; dis_psr: yes */
 		mode = igt_output_get_mode(output);
 		igt_assert(mode);
 
@@ -229,8 +233,27 @@ static void test_flow(data_t *data, enum sub_test option)
 				      mode->vdisplay, DRM_FORMAT_XRGB8888,
 				      0, &data->fb);
 		igt_plane_set_fb(data->primary, &data->fb);
+
+		/* psr_en: yes; ilr: no; dis_psr: yes
+		 * commit stream. power on eDP
+		 */
 		igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
 
+		/* psr_en: no; ilr: yes; dis_psr: yes.
+		 * With dis_psr yes, drm kernel driver
+		 * disable psr, psr_en is set to no.
+		 */
+
+		/* igt_amd_output_has_ilr_setting only checks if debugfs
+		 * exist. ilr settings could be all 0s -- not supported.
+		 * IGT needs to check if ilr settings values are supported.
+		 * Supported_ilr is read from DPCD registers. Make sure
+		 * eDP is powered on before reading supported_ilr.
+		 */
+		igt_amd_read_ilr_setting(data->drm_fd, output->name, data->supported_ilr);
+		if (data->supported_ilr[0] == 0)
+			continue;
+
 		/* Collect info of Reported Lane Count & ILR */
 		igt_amd_read_link_settings(data->drm_fd, output->name, data->lane_count,
 					   data->link_rate, data->link_spread_spectrum);
@@ -247,18 +270,38 @@ static void test_flow(data_t *data, enum sub_test option)
 				break;
 		}
 
+		/* psr_en: no; ilr: yes; dis_psr: yes */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_OFF);
+
+		/* Power down eDP.
+		 * psr_en: no; ilr: no; dis_psr: yes.
+		 */
+
+		/* Enable PSR after reading eDP Rx CRC */
+		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, false);
+
+		/* psr_en: no; ilr: yes: dis_psr: no */
+
+		/* Power on eDP and setup psr */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_ON);
+
+		/* psr_en: yes; ilr: yes: dis_psr: no */
+
 		/* Reset preferred link settings*/
 		memset(data->supported_ilr, 0, sizeof(data->supported_ilr));
 		igt_amd_write_ilr_setting(data->drm_fd, output->name, 0, 0);
 
+		/* psr_en: yes; ilr: yes; dis_psr: no */
+
+		/* commit 0 stream. power down eDP */
 		igt_remove_fb(data->drm_fd, &data->fb);
 
-		test_fini(data);
+		/* psr_en: yes; ilr: no; dis_psr: no */
 
-		/* Enable eDP PSR */
-		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, false);
+		test_fini(data);
 	}
-
 }
 
 igt_main
-- 
2.25.1


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

* [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test
@ 2024-03-25 12:08 Hersen Wu
  0 siblings, 0 replies; 11+ messages in thread
From: Hersen Wu @ 2024-03-25 12:08 UTC (permalink / raw)
  To: igt-dev, rodrigo.siqueira, aurabindo.pillai, alex.hung,
	hamza.mahfooz, sunpeng.li, wayne.lin
  Cc: markyacoub, Hersen Wu

From: Hersen Wu <Hersenxs.Wu@amd.com>

At end of test, with disallow_edp_enter_psr = 0, run DPMS off, on
for eDP. This will trigger DRM kernel driver enable eDP PSR.

Signed-off-by: Hersen Wu <Hersenxs.Wu@amd.com>
---
 lib/igt_amd.c          |  5 ---
 tests/amdgpu/amd_ilr.c | 69 ++++++++++++++++++++++++++++++++++--------
 2 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/lib/igt_amd.c b/lib/igt_amd.c
index 623883dbc..d10c3c1f2 100644
--- a/lib/igt_amd.c
+++ b/lib/igt_amd.c
@@ -1183,11 +1183,6 @@ void igt_amd_disallow_edp_enter_psr(int drm_fd, char *connector_name, bool enabl
 	const char *allow_edp_psr = "1";
 	const char *dis_allow_edp_psr = "0";
 
-	/* if current psr is not enabled, skip this debugfs */
-	if (!igt_amd_psr_support_drv(drm_fd, connector_name, PSR_MODE_1) &&
-		!igt_amd_psr_support_drv(drm_fd, connector_name, PSR_MODE_2))
-		return;
-
 	fd = igt_debugfs_connector_dir(drm_fd, connector_name, O_RDONLY);
 	igt_assert(fd >= 0);
 	ret = openat(fd, DEBUGFS_DISALLOW_EDP_ENTER_PSR, O_WRONLY);
diff --git a/tests/amdgpu/amd_ilr.c b/tests/amdgpu/amd_ilr.c
index 46ad6f60a..77e11aaad 100644
--- a/tests/amdgpu/amd_ilr.c
+++ b/tests/amdgpu/amd_ilr.c
@@ -199,28 +199,32 @@ static void test_flow(data_t *data, enum sub_test option)
 	igt_enable_connectors(data->drm_fd);
 
 	for_each_connected_output(&data->display, output) {
-		if (!igt_amd_output_has_ilr_setting(data->drm_fd, output->name) ||
+		if ((output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP) ||
+			!igt_amd_output_has_ilr_setting(data->drm_fd, output->name) ||
 			!igt_amd_output_has_link_settings(data->drm_fd, output->name)) {
 			igt_info("Skipping output: %s\n", output->name);
 			continue;
 		}
 
-		/* igt_amd_output_has_ilr_setting only checks if debugfs
-		 * exist. ilr settings could be all 0s -- not supported.
-		 * IGT needs to check if ilr settings values are supported.
-		 */
-		igt_amd_read_ilr_setting(data->drm_fd, output->name, data->supported_ilr);
-		if (data->supported_ilr[0] == 0)
-			continue;
-
 		igt_info("Testing on output: %s\n", output->name);
 
+		/* states under /sys/kernel/debug/dri/0/eDP-1:
+		 * psr_capability.driver_support (psr_en): yes
+		 * ilr_setting (ilr): yes/no
+		 * disallow_edp_enter_psr (dis_psr): no
+		 */
+
 		/* Init only if display supports ilr link settings */
 		test_init(data, output);
 
+		/* eDP is powered down within test_init
+		 * psr_en: yes; ilr: no; dis_psr: no
+		 */
+
 		/* Disable eDP PSR to avoid timeout when reading CRC */
 		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, true);
 
+		/* psr_en: yes; ilr: no; dis_psr: yes */
 		mode = igt_output_get_mode(output);
 		igt_assert(mode);
 
@@ -229,8 +233,27 @@ static void test_flow(data_t *data, enum sub_test option)
 				      mode->vdisplay, DRM_FORMAT_XRGB8888,
 				      0, &data->fb);
 		igt_plane_set_fb(data->primary, &data->fb);
+
+		/* psr_en: yes; ilr: no; dis_psr: yes
+		 * commit stream. power on eDP
+		 */
 		igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
 
+		/* psr_en: no; ilr: yes; dis_psr: yes.
+		 * With dis_psr yes, drm kernel driver
+		 * disable psr, psr_en is set to no.
+		 */
+
+		/* igt_amd_output_has_ilr_setting only checks if debugfs
+		 * exist. ilr settings could be all 0s -- not supported.
+		 * IGT needs to check if ilr settings values are supported.
+		 * Supported_ilr is read from DPCD registers. Make sure
+		 * eDP is powered on before reading supported_ilr.
+		 */
+		igt_amd_read_ilr_setting(data->drm_fd, output->name, data->supported_ilr);
+		if (data->supported_ilr[0] == 0)
+			continue;
+
 		/* Collect info of Reported Lane Count & ILR */
 		igt_amd_read_link_settings(data->drm_fd, output->name, data->lane_count,
 					   data->link_rate, data->link_spread_spectrum);
@@ -247,18 +270,38 @@ static void test_flow(data_t *data, enum sub_test option)
 				break;
 		}
 
+		/* psr_en: no; ilr: yes; dis_psr: yes */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_OFF);
+
+		/* Power down eDP.
+		 * psr_en: no; ilr: no; dis_psr: yes.
+		 */
+
+		/* Enable PSR after reading eDP Rx CRC */
+		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, false);
+
+		/* psr_en: no; ilr: yes: dis_psr: no */
+
+		/* Power on eDP and setup psr */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_ON);
+
+		/* psr_en: yes; ilr: yes: dis_psr: no */
+
 		/* Reset preferred link settings*/
 		memset(data->supported_ilr, 0, sizeof(data->supported_ilr));
 		igt_amd_write_ilr_setting(data->drm_fd, output->name, 0, 0);
 
+		/* psr_en: yes; ilr: yes; dis_psr: no */
+
+		/* commit 0 stream. power down eDP */
 		igt_remove_fb(data->drm_fd, &data->fb);
 
-		test_fini(data);
+		/* psr_en: yes; ilr: no; dis_psr: no */
 
-		/* Enable eDP PSR */
-		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, false);
+		test_fini(data);
 	}
-
 }
 
 igt_main
-- 
2.25.1


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

* [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test
@ 2024-03-25 13:19 Hersen Wu
  2024-03-25 14:03 ` ✓ CI.xeBAT: success for tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test (rev3) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Hersen Wu @ 2024-03-25 13:19 UTC (permalink / raw)
  To: igt-dev, rodrigo.siqueira, aurabindo.pillai, alex.hung,
	hamza.mahfooz, sunpeng.li, wayne.lin
  Cc: markyacoub, Hersen Wu

From: Hersen Wu <Hersenxs.Wu@amd.com>

At end of test, with disallow_edp_enter_psr = 0, run DPMS off, on
for eDP. This will trigger DRM kernel driver enable eDP PSR.

Signed-off-by: Hersen Wu <Hersenxs.Wu@amd.com>
---
 lib/igt_amd.c          |  5 ---
 tests/amdgpu/amd_ilr.c | 73 ++++++++++++++++++++++++++++++++++--------
 2 files changed, 60 insertions(+), 18 deletions(-)

diff --git a/lib/igt_amd.c b/lib/igt_amd.c
index 623883dbc..d10c3c1f2 100644
--- a/lib/igt_amd.c
+++ b/lib/igt_amd.c
@@ -1183,11 +1183,6 @@ void igt_amd_disallow_edp_enter_psr(int drm_fd, char *connector_name, bool enabl
 	const char *allow_edp_psr = "1";
 	const char *dis_allow_edp_psr = "0";
 
-	/* if current psr is not enabled, skip this debugfs */
-	if (!igt_amd_psr_support_drv(drm_fd, connector_name, PSR_MODE_1) &&
-		!igt_amd_psr_support_drv(drm_fd, connector_name, PSR_MODE_2))
-		return;
-
 	fd = igt_debugfs_connector_dir(drm_fd, connector_name, O_RDONLY);
 	igt_assert(fd >= 0);
 	ret = openat(fd, DEBUGFS_DISALLOW_EDP_ENTER_PSR, O_WRONLY);
diff --git a/tests/amdgpu/amd_ilr.c b/tests/amdgpu/amd_ilr.c
index 46ad6f60a..f63a4f782 100644
--- a/tests/amdgpu/amd_ilr.c
+++ b/tests/amdgpu/amd_ilr.c
@@ -199,28 +199,33 @@ static void test_flow(data_t *data, enum sub_test option)
 	igt_enable_connectors(data->drm_fd);
 
 	for_each_connected_output(&data->display, output) {
-		if (!igt_amd_output_has_ilr_setting(data->drm_fd, output->name) ||
+		if ((output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP) ||
+			!igt_amd_output_has_ilr_setting(data->drm_fd, output->name) ||
 			!igt_amd_output_has_link_settings(data->drm_fd, output->name)) {
 			igt_info("Skipping output: %s\n", output->name);
 			continue;
 		}
 
-		/* igt_amd_output_has_ilr_setting only checks if debugfs
-		 * exist. ilr settings could be all 0s -- not supported.
-		 * IGT needs to check if ilr settings values are supported.
-		 */
-		igt_amd_read_ilr_setting(data->drm_fd, output->name, data->supported_ilr);
-		if (data->supported_ilr[0] == 0)
-			continue;
-
 		igt_info("Testing on output: %s\n", output->name);
 
+		/* states under /sys/kernel/debug/dri/0/eDP-1:
+		 * psr_capability.driver_support (drv_support_psr): yes
+		 * ilr_setting (intermediate link rates capabilities,
+		 * ilr_cap): yes/no
+		 * kernel driver disallow_edp_enter_psr (dis_psr): no
+		 */
+
 		/* Init only if display supports ilr link settings */
 		test_init(data, output);
 
+		/* eDP enter power saving mode within test_init
+		 * drv_support_psr: yes; ilr_cap: no; dis_psr: no
+		 */
+
 		/* Disable eDP PSR to avoid timeout when reading CRC */
 		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, true);
 
+		/* drv_support_psr: yes; ilr_cap: no; dis_psr: yes */
 		mode = igt_output_get_mode(output);
 		igt_assert(mode);
 
@@ -229,8 +234,30 @@ static void test_flow(data_t *data, enum sub_test option)
 				      mode->vdisplay, DRM_FORMAT_XRGB8888,
 				      0, &data->fb);
 		igt_plane_set_fb(data->primary, &data->fb);
+
+		/* drv_support_psr: yes; ilr_cap: no; dis_psr: yes
+		 * commit stream. eDP exit power saving mode.
+		 */
 		igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
 
+		/* drv_support_psr: no; ilr_cap: yes; dis_psr: yes.
+		 * With dis_psr yes, drm kernel driver
+		 * disable psr, psr_en is set to no.
+		 */
+
+		/* igt_amd_output_has_ilr_setting only checks if debugfs
+		 * exist. ilr settings could be all 0s -- not supported.
+		 * IGT needs to check if ilr settings values are supported.
+		 * Supported_ilr is read from DPCD registers. Make sure
+		 * eDP exiting power saving mode before reading supported_ilr.
+		 */
+		igt_amd_read_ilr_setting(data->drm_fd, output->name, data->supported_ilr);
+		if (data->supported_ilr[0] == 0) {
+			/* Enable PSR after reading eDP Rx CRC */
+			igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, false);
+			continue;
+		}
+
 		/* Collect info of Reported Lane Count & ILR */
 		igt_amd_read_link_settings(data->drm_fd, output->name, data->lane_count,
 					   data->link_rate, data->link_spread_spectrum);
@@ -247,18 +274,38 @@ static void test_flow(data_t *data, enum sub_test option)
 				break;
 		}
 
+		/* drv_support_psr: no; ilr_cap: yes; dis_psr: yes */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_OFF);
+
+		/* eDP enter power saving mode.
+		 * drv_support_psr: no; ilr_cap: no; dis_psr: yes.
+		 */
+
+		/* Enable PSR after reading eDP Rx CRC */
+		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, false);
+
+		/* drv_support_psr: no; ilr_cap: yes: dis_psr: no */
+
+		/* eDP exit power saving mode and setup psr */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_ON);
+
+		/* drv_support_psr: yes; ilr_cap: yes: dis_psr: no */
+
 		/* Reset preferred link settings*/
 		memset(data->supported_ilr, 0, sizeof(data->supported_ilr));
 		igt_amd_write_ilr_setting(data->drm_fd, output->name, 0, 0);
 
+		/* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
+
+		/* commit 0 stream. eDP enter power saving mode */
 		igt_remove_fb(data->drm_fd, &data->fb);
 
-		test_fini(data);
+		/* drv_support_psr: yes; ilr_cap: no; dis_psr: no */
 
-		/* Enable eDP PSR */
-		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, false);
+		test_fini(data);
 	}
-
 }
 
 igt_main
-- 
2.25.1


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

* ✓ CI.xeBAT: success for tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test (rev3)
  2024-03-25 13:19 [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test Hersen Wu
@ 2024-03-25 14:03 ` Patchwork
  2024-03-25 14:11 ` ✗ Fi.CI.BAT: failure " Patchwork
  2024-03-28  3:58 ` [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test Lin, Wayne
  2 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2024-03-25 14:03 UTC (permalink / raw)
  To: Hersen Wu; +Cc: igt-dev

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

== Series Details ==

Series: tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test (rev3)
URL   : https://patchwork.freedesktop.org/series/131298/
State : success

== Summary ==

CI Bug Log - changes from XEIGT_7780_BAT -> XEIGTPW_10900_BAT
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Participating hosts (4 -> 4)
------------------------------

  No changes in participating hosts

Known issues
------------

  Here are the changes found in XEIGTPW_10900_BAT that come from known issues:

### IGT changes ###

#### Warnings ####

  * igt@xe_evict@evict-beng-mixed-threads-small-multi-vm:
    - bat-dg2-oem2:       [FAIL][1] ([Intel XE#1259]) -> [INCOMPLETE][2] ([Intel XE#804])
   [1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7780/bat-dg2-oem2/igt@xe_evict@evict-beng-mixed-threads-small-multi-vm.html
   [2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10900/bat-dg2-oem2/igt@xe_evict@evict-beng-mixed-threads-small-multi-vm.html

  
  [Intel XE#1259]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1259
  [Intel XE#804]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/804


Build changes
-------------

  * IGT: IGT_7780 -> IGTPW_10900
  * Linux: xe-984-093d82c02921344d8d400989af156aaf79b9d961 -> xe-987-fc736bbab7abcae683f52604591fe16cf2a85b3e

  IGTPW_10900: 10900
  IGT_7780: 93a5298ac980333738cf75da6b66fa6f3769205f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  xe-984-093d82c02921344d8d400989af156aaf79b9d961: 093d82c02921344d8d400989af156aaf79b9d961
  xe-987-fc736bbab7abcae683f52604591fe16cf2a85b3e: fc736bbab7abcae683f52604591fe16cf2a85b3e

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10900/index.html

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

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

* ✗ Fi.CI.BAT: failure for tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test (rev3)
  2024-03-25 13:19 [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test Hersen Wu
  2024-03-25 14:03 ` ✓ CI.xeBAT: success for tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test (rev3) Patchwork
@ 2024-03-25 14:11 ` Patchwork
  2024-03-28  3:58 ` [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test Lin, Wayne
  2 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2024-03-25 14:11 UTC (permalink / raw)
  To: Hersen Wu; +Cc: igt-dev

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

== Series Details ==

Series: tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test (rev3)
URL   : https://patchwork.freedesktop.org/series/131298/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14478 -> IGTPW_10900
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_10900 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_10900, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/index.html

Participating hosts (36 -> 37)
------------------------------

  Additional (4): bat-arls-4 bat-atsm-1 bat-rpls-3 bat-arls-3 
  Missing    (3): bat-mtlp-8 bat-jsl-1 fi-snb-2520m 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_10900:

### IGT changes ###

#### Possible regressions ####

  * igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
    - bat-rpls-3:         NOTRUN -> [SKIP][1] +9 other tests skip
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@kms_cursor_legacy@basic-flip-after-cursor-legacy.html

  
Known issues
------------

  Here are the changes found in IGTPW_10900 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@debugfs_test@basic-hwmon:
    - bat-arls-3:         NOTRUN -> [SKIP][2] ([i915#9318])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@debugfs_test@basic-hwmon.html
    - bat-rpls-3:         NOTRUN -> [SKIP][3] ([i915#9318])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@debugfs_test@basic-hwmon.html

  * igt@fbdev@info:
    - bat-rpls-3:         NOTRUN -> [SKIP][4] ([i915#1849] / [i915#2582])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@fbdev@info.html

  * igt@fbdev@write:
    - bat-rpls-3:         NOTRUN -> [SKIP][5] ([i915#2582]) +3 other tests skip
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@fbdev@write.html

  * igt@gem_huc_copy@huc-copy:
    - bat-atsm-1:         NOTRUN -> [FAIL][6] ([i915#10563])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-atsm-1/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@basic@lmem0:
    - bat-dg2-11:         [PASS][7] -> [FAIL][8] ([i915#10378])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14478/bat-dg2-11/igt@gem_lmem_swapping@basic@lmem0.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-dg2-11/igt@gem_lmem_swapping@basic@lmem0.html

  * igt@gem_lmem_swapping@parallel-random-engines:
    - bat-arls-3:         NOTRUN -> [SKIP][9] ([i915#10213]) +3 other tests skip
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@gem_lmem_swapping@parallel-random-engines.html

  * igt@gem_lmem_swapping@random-engines:
    - bat-rpls-3:         NOTRUN -> [SKIP][10] ([i915#4613]) +3 other tests skip
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@gem_lmem_swapping@random-engines.html

  * igt@gem_mmap@basic:
    - bat-atsm-1:         NOTRUN -> [SKIP][11] ([i915#4083])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-atsm-1/igt@gem_mmap@basic.html
    - bat-arls-3:         NOTRUN -> [SKIP][12] ([i915#4083])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@gem_mmap@basic.html

  * igt@gem_render_tiled_blits@basic:
    - bat-arls-3:         NOTRUN -> [SKIP][13] ([i915#10197] / [i915#10211] / [i915#4079])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@gem_render_tiled_blits@basic.html

  * igt@gem_tiled_blits@basic:
    - bat-arls-3:         NOTRUN -> [SKIP][14] ([i915#10196] / [i915#4077]) +2 other tests skip
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@gem_tiled_blits@basic.html

  * igt@gem_tiled_pread_basic:
    - bat-atsm-1:         NOTRUN -> [SKIP][15] ([i915#4079]) +1 other test skip
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-atsm-1/igt@gem_tiled_pread_basic.html
    - bat-arls-3:         NOTRUN -> [SKIP][16] ([i915#10206] / [i915#4079])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@gem_tiled_pread_basic.html
    - bat-rpls-3:         NOTRUN -> [SKIP][17] ([i915#3282])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@gem_tiled_pread_basic.html

  * igt@i915_module_load@load:
    - bat-dg2-9:          [PASS][18] -> [DMESG-WARN][19] ([i915#10014])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14478/bat-dg2-9/igt@i915_module_load@load.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-dg2-9/igt@i915_module_load@load.html

  * igt@i915_pm_rps@basic-api:
    - bat-atsm-1:         NOTRUN -> [SKIP][20] ([i915#6621])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-atsm-1/igt@i915_pm_rps@basic-api.html
    - bat-arls-3:         NOTRUN -> [SKIP][21] ([i915#10209])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@i915_pm_rps@basic-api.html

  * igt@i915_selftest@live@gem:
    - bat-atsm-1:         NOTRUN -> [ABORT][22] ([i915#10564])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-atsm-1/igt@i915_selftest@live@gem.html

  * igt@i915_selftest@live@hangcheck:
    - bat-rpls-3:         NOTRUN -> [DMESG-WARN][23] ([i915#5591])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@i915_selftest@live@hangcheck.html

  * igt@i915_selftest@live@perf:
    - bat-dg2-14:         [PASS][24] -> [ABORT][25] ([i915#10366])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14478/bat-dg2-14/igt@i915_selftest@live@perf.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-dg2-14/igt@i915_selftest@live@perf.html

  * igt@kms_addfb_basic@addfb25-x-tiled-legacy:
    - bat-arls-3:         NOTRUN -> [SKIP][26] ([i915#10200]) +9 other tests skip
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@kms_addfb_basic@addfb25-x-tiled-legacy.html

  * igt@kms_addfb_basic@size-max:
    - bat-atsm-1:         NOTRUN -> [SKIP][27] ([i915#6077]) +37 other tests skip
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-atsm-1/igt@kms_addfb_basic@size-max.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - bat-arls-3:         NOTRUN -> [SKIP][28] ([i915#10202]) +1 other test skip
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
    - bat-atsm-1:         NOTRUN -> [SKIP][29] ([i915#6078]) +22 other tests skip
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-atsm-1/igt@kms_cursor_legacy@basic-flip-after-cursor-atomic.html

  * igt@kms_dsc@dsc-basic:
    - bat-arls-3:         NOTRUN -> [SKIP][30] ([i915#9886])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@kms_dsc@dsc-basic.html

  * igt@kms_flip@basic-flip-vs-dpms:
    - bat-rpls-3:         NOTRUN -> [SKIP][31] ([i915#3637]) +3 other tests skip
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@kms_flip@basic-flip-vs-dpms.html

  * igt@kms_force_connector_basic@force-load-detect:
    - bat-arls-3:         NOTRUN -> [SKIP][32] ([i915#10207])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@kms_force_connector_basic@force-load-detect.html
    - bat-rpls-3:         NOTRUN -> [SKIP][33]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_force_connector_basic@prune-stale-modes:
    - bat-atsm-1:         NOTRUN -> [SKIP][34] ([i915#6093]) +4 other tests skip
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-atsm-1/igt@kms_force_connector_basic@prune-stale-modes.html

  * igt@kms_frontbuffer_tracking@basic:
    - bat-rpls-3:         NOTRUN -> [SKIP][35] ([i915#1849] / [i915#5354])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@kms_frontbuffer_tracking@basic.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-xr24:
    - bat-atsm-1:         NOTRUN -> [SKIP][36] ([i915#1836]) +6 other tests skip
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-atsm-1/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-xr24.html

  * igt@kms_pipe_crc_basic@read-crc:
    - bat-rpls-3:         NOTRUN -> [SKIP][37] ([i915#9920]) +6 other tests skip
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@kms_pipe_crc_basic@read-crc.html

  * igt@kms_pm_backlight@basic-brightness:
    - bat-arls-3:         NOTRUN -> [SKIP][38] ([i915#9812])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@kms_pm_backlight@basic-brightness.html
    - bat-rpls-3:         NOTRUN -> [SKIP][39] ([i915#5354])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@kms_pm_backlight@basic-brightness.html

  * igt@kms_prop_blob@basic:
    - bat-atsm-1:         NOTRUN -> [SKIP][40] ([i915#7357])
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-atsm-1/igt@kms_prop_blob@basic.html

  * igt@kms_psr@psr-cursor-plane-move:
    - bat-rpls-3:         NOTRUN -> [SKIP][41] ([i915#1072] / [i915#9673] / [i915#9732]) +3 other tests skip
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@kms_psr@psr-cursor-plane-move.html

  * igt@kms_psr@psr-primary-mmap-gtt:
    - bat-arls-3:         NOTRUN -> [SKIP][42] ([i915#9732]) +3 other tests skip
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@kms_psr@psr-primary-mmap-gtt.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - bat-atsm-1:         NOTRUN -> [SKIP][43] ([i915#6094])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-atsm-1/igt@kms_setmode@basic-clone-single-crtc.html
    - bat-arls-3:         NOTRUN -> [SKIP][44] ([i915#10208] / [i915#8809])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@kms_setmode@basic-clone-single-crtc.html
    - bat-rpls-3:         NOTRUN -> [SKIP][45] ([i915#3555])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@prime_vgem@basic-fence-flip:
    - bat-rpls-3:         NOTRUN -> [SKIP][46] ([i915#3708]) +3 other tests skip
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-rpls-3/igt@prime_vgem@basic-fence-flip.html

  * igt@prime_vgem@basic-fence-mmap:
    - bat-atsm-1:         NOTRUN -> [SKIP][47] ([i915#4077]) +4 other tests skip
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-atsm-1/igt@prime_vgem@basic-fence-mmap.html
    - bat-arls-3:         NOTRUN -> [SKIP][48] ([i915#10196] / [i915#3708] / [i915#4077]) +1 other test skip
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@prime_vgem@basic-fence-mmap.html

  * igt@prime_vgem@basic-fence-read:
    - bat-arls-3:         NOTRUN -> [SKIP][49] ([i915#10212] / [i915#3708])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@prime_vgem@basic-fence-read.html

  * igt@prime_vgem@basic-read:
    - bat-arls-3:         NOTRUN -> [SKIP][50] ([i915#10214] / [i915#3708])
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@prime_vgem@basic-read.html

  * igt@prime_vgem@basic-write:
    - bat-atsm-1:         NOTRUN -> [SKIP][51] +2 other tests skip
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-atsm-1/igt@prime_vgem@basic-write.html
    - bat-arls-3:         NOTRUN -> [SKIP][52] ([i915#10216] / [i915#3708])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/bat-arls-3/igt@prime_vgem@basic-write.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [i915#10014]: https://gitlab.freedesktop.org/drm/intel/issues/10014
  [i915#10196]: https://gitlab.freedesktop.org/drm/intel/issues/10196
  [i915#10197]: https://gitlab.freedesktop.org/drm/intel/issues/10197
  [i915#10200]: https://gitlab.freedesktop.org/drm/intel/issues/10200
  [i915#10202]: https://gitlab.freedesktop.org/drm/intel/issues/10202
  [i915#10206]: https://gitlab.freedesktop.org/drm/intel/issues/10206
  [i915#10207]: https://gitlab.freedesktop.org/drm/intel/issues/10207
  [i915#10208]: https://gitlab.freedesktop.org/drm/intel/issues/10208
  [i915#10209]: https://gitlab.freedesktop.org/drm/intel/issues/10209
  [i915#10211]: https://gitlab.freedesktop.org/drm/intel/issues/10211
  [i915#10212]: https://gitlab.freedesktop.org/drm/intel/issues/10212
  [i915#10213]: https://gitlab.freedesktop.org/drm/intel/issues/10213
  [i915#10214]: https://gitlab.freedesktop.org/drm/intel/issues/10214
  [i915#10216]: https://gitlab.freedesktop.org/drm/intel/issues/10216
  [i915#10366]: https://gitlab.freedesktop.org/drm/intel/issues/10366
  [i915#10378]: https://gitlab.freedesktop.org/drm/intel/issues/10378
  [i915#10436]: https://gitlab.freedesktop.org/drm/intel/issues/10436
  [i915#10563]: https://gitlab.freedesktop.org/drm/intel/issues/10563
  [i915#10564]: https://gitlab.freedesktop.org/drm/intel/issues/10564
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1836]: https://gitlab.freedesktop.org/drm/intel/issues/1836
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#5591]: https://gitlab.freedesktop.org/drm/intel/issues/5591
  [i915#6077]: https://gitlab.freedesktop.org/drm/intel/issues/6077
  [i915#6078]: https://gitlab.freedesktop.org/drm/intel/issues/6078
  [i915#6093]: https://gitlab.freedesktop.org/drm/intel/issues/6093
  [i915#6094]: https://gitlab.freedesktop.org/drm/intel/issues/6094
  [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
  [i915#7357]: https://gitlab.freedesktop.org/drm/intel/issues/7357
  [i915#8809]: https://gitlab.freedesktop.org/drm/intel/issues/8809
  [i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
  [i915#9673]: https://gitlab.freedesktop.org/drm/intel/issues/9673
  [i915#9732]: https://gitlab.freedesktop.org/drm/intel/issues/9732
  [i915#9812]: https://gitlab.freedesktop.org/drm/intel/issues/9812
  [i915#9886]: https://gitlab.freedesktop.org/drm/intel/issues/9886
  [i915#9920]: https://gitlab.freedesktop.org/drm/intel/issues/9920


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_7780 -> IGTPW_10900

  CI-20190529: 20190529
  CI_DRM_14478: fc736bbab7abcae683f52604591fe16cf2a85b3e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_10900: 10900
  IGT_7780: 93a5298ac980333738cf75da6b66fa6f3769205f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10900/index.html

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

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

* RE: [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test
  2024-03-25 13:19 [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test Hersen Wu
  2024-03-25 14:03 ` ✓ CI.xeBAT: success for tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test (rev3) Patchwork
  2024-03-25 14:11 ` ✗ Fi.CI.BAT: failure " Patchwork
@ 2024-03-28  3:58 ` Lin, Wayne
  2024-04-01 23:31   ` Wu, Hersen
  2 siblings, 1 reply; 11+ messages in thread
From: Lin, Wayne @ 2024-03-28  3:58 UTC (permalink / raw)
  To: Wu, Hersen, igt-dev@lists.freedesktop.org, Siqueira, Rodrigo,
	Pillai, Aurabindo, Hung, Alex, Mahfooz, Hamza, Li, Sun peng (Leo)
  Cc: markyacoub@google.com, Wu, Hersen

[Public]

Hi Hersen,

Add few comments inline. On the other hand, would be good to add the version in the subject and also to record changes made by each version.
Thanks.

Regards,
Wayne Lin
> -----Original Message-----
> From: Hersen Wu <hersenxs.wu@amd.com>
> Sent: Monday, March 25, 2024 9:19 PM
> To: igt-dev@lists.freedesktop.org; Siqueira, Rodrigo
> <Rodrigo.Siqueira@amd.com>; Pillai, Aurabindo
> <Aurabindo.Pillai@amd.com>; Hung, Alex <Alex.Hung@amd.com>; Mahfooz,
> Hamza <Hamza.Mahfooz@amd.com>; Li, Sun peng (Leo)
> <Sunpeng.Li@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>
> Cc: markyacoub@google.com; Wu, Hersen <hersenxs.wu@amd.com>
> Subject: [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled
> after test
>
> From: Hersen Wu <Hersenxs.Wu@amd.com>
>
> At end of test, with disallow_edp_enter_psr = 0, run DPMS off, on for eDP. This
> will trigger DRM kernel driver enable eDP PSR.
>
> Signed-off-by: Hersen Wu <Hersenxs.Wu@amd.com>
> ---
>  lib/igt_amd.c          |  5 ---
>  tests/amdgpu/amd_ilr.c | 73 ++++++++++++++++++++++++++++++++++---
> -----
>  2 files changed, 60 insertions(+), 18 deletions(-)
>
> diff --git a/lib/igt_amd.c b/lib/igt_amd.c index 623883dbc..d10c3c1f2
> 100644
> --- a/lib/igt_amd.c
> +++ b/lib/igt_amd.c
> @@ -1183,11 +1183,6 @@ void igt_amd_disallow_edp_enter_psr(int
> drm_fd, char *connector_name, bool enabl
>       const char *allow_edp_psr = "1";
>       const char *dis_allow_edp_psr = "0";
>
> -     /* if current psr is not enabled, skip this debugfs */
> -     if (!igt_amd_psr_support_drv(drm_fd, connector_name,
> PSR_MODE_1) &&
> -             !igt_amd_psr_support_drv(drm_fd, connector_name,
> PSR_MODE_2))
> -             return;
> -
>       fd = igt_debugfs_connector_dir(drm_fd, connector_name,
> O_RDONLY);
>       igt_assert(fd >= 0);
>       ret = openat(fd, DEBUGFS_DISALLOW_EDP_ENTER_PSR, O_WRONLY);
> diff --git a/tests/amdgpu/amd_ilr.c b/tests/amdgpu/amd_ilr.c index
> 46ad6f60a..f63a4f782 100644
> --- a/tests/amdgpu/amd_ilr.c
> +++ b/tests/amdgpu/amd_ilr.c
> @@ -199,28 +199,33 @@ static void test_flow(data_t *data, enum sub_test
> option)
>       igt_enable_connectors(data->drm_fd);
>
>       for_each_connected_output(&data->display, output) {
> -             if (!igt_amd_output_has_ilr_setting(data->drm_fd, output-
> >name) ||
> +             if ((output->config.connector->connector_type !=
> DRM_MODE_CONNECTOR_eDP) ||

I think adding this line should be redundant since ilr_setting debugfs entry is
limited to be created for edp connector already in amdgpu_dm_debugfs.c

> +                     !igt_amd_output_has_ilr_setting(data->drm_fd,
> output->name) ||
>                       !igt_amd_output_has_link_settings(data->drm_fd,
> output->name)) {
>                       igt_info("Skipping output: %s\n", output->name);
>                       continue;
>               }
>
> -             /* igt_amd_output_has_ilr_setting only checks if debugfs
> -              * exist. ilr settings could be all 0s -- not supported.
> -              * IGT needs to check if ilr settings values are supported.
> -              */
> -             igt_amd_read_ilr_setting(data->drm_fd, output->name, data-
> >supported_ilr);
> -             if (data->supported_ilr[0] == 0)
> -                     continue;
> -
>               igt_info("Testing on output: %s\n", output->name);
>
> +             /* states under /sys/kernel/debug/dri/0/eDP-1:
> +              * psr_capability.driver_support (drv_support_psr): yes
> +              * ilr_setting (intermediate link rates capabilities,
> +              * ilr_cap): yes/no
> +              * kernel driver disallow_edp_enter_psr (dis_psr): no
> +              */
> +
>               /* Init only if display supports ilr link settings */
>               test_init(data, output);
>
> +             /* eDP enter power saving mode within test_init
> +              * drv_support_psr: yes; ilr_cap: no; dis_psr: no
> +              */
> +
>               /* Disable eDP PSR to avoid timeout when reading CRC */
>               igt_amd_disallow_edp_enter_psr(data->drm_fd, output-
> >name, true);
>
> +             /* drv_support_psr: yes; ilr_cap: no; dis_psr: yes */
>               mode = igt_output_get_mode(output);
>               igt_assert(mode);
>
> @@ -229,8 +234,30 @@ static void test_flow(data_t *data, enum sub_test
> option)
>                                     mode->vdisplay,
> DRM_FORMAT_XRGB8888,
>                                     0, &data->fb);
>               igt_plane_set_fb(data->primary, &data->fb);
> +
> +             /* drv_support_psr: yes; ilr_cap: no; dis_psr: yes
> +              * commit stream. eDP exit power saving mode.
> +              */
>               igt_display_commit_atomic(&data->display,
> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>
> +             /* drv_support_psr: no; ilr_cap: yes; dis_psr: yes.
> +              * With dis_psr yes, drm kernel driver
> +              * disable psr, psr_en is set to no.
> +              */
> +
> +             /* igt_amd_output_has_ilr_setting only checks if debugfs
> +              * exist. ilr settings could be all 0s -- not supported.
> +              * IGT needs to check if ilr settings values are supported.
> +              * Supported_ilr is read from DPCD registers. Make sure
> +              * eDP exiting power saving mode before reading
> supported_ilr.
> +              */
> +             igt_amd_read_ilr_setting(data->drm_fd, output->name, data-
> >supported_ilr);
> +             if (data->supported_ilr[0] == 0) {
> +                     /* Enable PSR after reading eDP Rx CRC */
> +                     igt_amd_disallow_edp_enter_psr(data->drm_fd,
> output->name, false);

Should we also switch dpms off->on to have drv_support_psr become 'yes'?
What about we move this checking just right after test_init() and force DPMS on
Before reading ilr capabilities? Then we can return quickly and don't have to
touch dis_psr.

> +                     continue;
> +             }
> +
>               /* Collect info of Reported Lane Count & ILR */
>               igt_amd_read_link_settings(data->drm_fd, output->name,
> data->lane_count,
>                                          data->link_rate, data-
> >link_spread_spectrum); @@ -247,18 +274,38 @@ static void
> test_flow(data_t *data, enum sub_test option)
>                               break;
>               }
>
> +             /* drv_support_psr: no; ilr_cap: yes; dis_psr: yes */
> +             kmstest_set_connector_dpms(data->drm_fd,
> +                     output->config.connector, DRM_MODE_DPMS_OFF);
> +
> +             /* eDP enter power saving mode.
> +              * drv_support_psr: no; ilr_cap: no; dis_psr: yes.
> +              */
> +
> +             /* Enable PSR after reading eDP Rx CRC */
> +             igt_amd_disallow_edp_enter_psr(data->drm_fd, output-
> >name, false);
> +
> +             /* drv_support_psr: no; ilr_cap: yes: dis_psr: no */
> +
> +             /* eDP exit power saving mode and setup psr */
> +             kmstest_set_connector_dpms(data->drm_fd,
> +                     output->config.connector, DRM_MODE_DPMS_ON);
> +
> +             /* drv_support_psr: yes; ilr_cap: yes: dis_psr: no */
> +
>               /* Reset preferred link settings*/
>               memset(data->supported_ilr, 0, sizeof(data->supported_ilr));
>               igt_amd_write_ilr_setting(data->drm_fd, output->name, 0,
> 0);
>
> +             /* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
> +
> +             /* commit 0 stream. eDP enter power saving mode */
>               igt_remove_fb(data->drm_fd, &data->fb);
>
> -             test_fini(data);
> +             /* drv_support_psr: yes; ilr_cap: no; dis_psr: no */
>
> -             /* Enable eDP PSR */
> -             igt_amd_disallow_edp_enter_psr(data->drm_fd, output-
> >name, false);
> +             test_fini(data);
>       }
> -
>  }
>
>  igt_main
> --
> 2.25.1


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

* RE: [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test
  2024-03-28  3:58 ` [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test Lin, Wayne
@ 2024-04-01 23:31   ` Wu, Hersen
  0 siblings, 0 replies; 11+ messages in thread
From: Wu, Hersen @ 2024-04-01 23:31 UTC (permalink / raw)
  To: Lin, Wayne, igt-dev@lists.freedesktop.org, Siqueira, Rodrigo,
	Pillai, Aurabindo, Hung, Alex, Mahfooz, Hamza, Li, Sun peng (Leo)
  Cc: markyacoub@google.com

[Public]

Hi Wayne,

Thank for your review. See my reply inline.
I am going to post new change for review.

Hesen




-----Original Message-----
From: Lin, Wayne <Wayne.Lin@amd.com>
Sent: Wednesday, March 27, 2024 11:59 PM
To: Wu, Hersen <hersenxs.wu@amd.com>; igt-dev@lists.freedesktop.org; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; Hung, Alex <Alex.Hung@amd.com>; Mahfooz, Hamza <Hamza.Mahfooz@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>
Cc: markyacoub@google.com; Wu, Hersen <hersenxs.wu@amd.com>
Subject: RE: [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test

[Public]

Hi Hersen,

Add few comments inline. On the other hand, would be good to add the version in the subject and also to record changes made by each version.
Thanks.

Regards,
Wayne Lin
> -----Original Message-----
> From: Hersen Wu <hersenxs.wu@amd.com>
> Sent: Monday, March 25, 2024 9:19 PM
> To: igt-dev@lists.freedesktop.org; Siqueira, Rodrigo
> <Rodrigo.Siqueira@amd.com>; Pillai, Aurabindo
> <Aurabindo.Pillai@amd.com>; Hung, Alex <Alex.Hung@amd.com>; Mahfooz,
> Hamza <Hamza.Mahfooz@amd.com>; Li, Sun peng (Leo)
> <Sunpeng.Li@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>
> Cc: markyacoub@google.com; Wu, Hersen <hersenxs.wu@amd.com>
> Subject: [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be
> re-enabled after test
>
> From: Hersen Wu <Hersenxs.Wu@amd.com>
>
> At end of test, with disallow_edp_enter_psr = 0, run DPMS off, on for
> eDP. This will trigger DRM kernel driver enable eDP PSR.
>
> Signed-off-by: Hersen Wu <Hersenxs.Wu@amd.com>
> ---
>  lib/igt_amd.c          |  5 ---
>  tests/amdgpu/amd_ilr.c | 73 ++++++++++++++++++++++++++++++++++---
> -----
>  2 files changed, 60 insertions(+), 18 deletions(-)
>
> diff --git a/lib/igt_amd.c b/lib/igt_amd.c index 623883dbc..d10c3c1f2
> 100644
> --- a/lib/igt_amd.c
> +++ b/lib/igt_amd.c
> @@ -1183,11 +1183,6 @@ void igt_amd_disallow_edp_enter_psr(int
> drm_fd, char *connector_name, bool enabl
>       const char *allow_edp_psr = "1";
>       const char *dis_allow_edp_psr = "0";
>
> -     /* if current psr is not enabled, skip this debugfs */
> -     if (!igt_amd_psr_support_drv(drm_fd, connector_name,
> PSR_MODE_1) &&
> -             !igt_amd_psr_support_drv(drm_fd, connector_name,
> PSR_MODE_2))
> -             return;
> -
>       fd = igt_debugfs_connector_dir(drm_fd, connector_name,
> O_RDONLY);
>       igt_assert(fd >= 0);
>       ret = openat(fd, DEBUGFS_DISALLOW_EDP_ENTER_PSR, O_WRONLY); diff
> --git a/tests/amdgpu/amd_ilr.c b/tests/amdgpu/amd_ilr.c index
> 46ad6f60a..f63a4f782 100644
> --- a/tests/amdgpu/amd_ilr.c
> +++ b/tests/amdgpu/amd_ilr.c
> @@ -199,28 +199,33 @@ static void test_flow(data_t *data, enum
> sub_test
> option)
>       igt_enable_connectors(data->drm_fd);
>
>       for_each_connected_output(&data->display, output) {
> -             if (!igt_amd_output_has_ilr_setting(data->drm_fd, output-
> >name) ||
> +             if ((output->config.connector->connector_type !=
> DRM_MODE_CONNECTOR_eDP) ||

I think adding this line should be redundant since ilr_setting debugfs entry is limited to be created for edp connector already in amdgpu_dm_debugfs.c

[Hersen] By latest IGT source, writeback connector is set with is_atomic = true before output is built.  Within amd_ilr, for_each_connected_output will loop to writeback connector,
The following message will show in IGT log.

output Writeback-1: ilr_setting debugfs not supported
Skipping output: Writeback-1

Amd_ilr test is for eDP. It is better now showing writeback within IGT log.




> +                     !igt_amd_output_has_ilr_setting(data->drm_fd,
> output->name) ||
>                       !igt_amd_output_has_link_settings(data->drm_fd,
> output->name)) {
>                       igt_info("Skipping output: %s\n", output->name);
>                       continue;
>               }
>
> -             /* igt_amd_output_has_ilr_setting only checks if debugfs
> -              * exist. ilr settings could be all 0s -- not supported.
> -              * IGT needs to check if ilr settings values are supported.
> -              */
> -             igt_amd_read_ilr_setting(data->drm_fd, output->name, data-
> >supported_ilr);
> -             if (data->supported_ilr[0] == 0)
> -                     continue;
> -
>               igt_info("Testing on output: %s\n", output->name);
>
> +             /* states under /sys/kernel/debug/dri/0/eDP-1:
> +              * psr_capability.driver_support (drv_support_psr): yes
> +              * ilr_setting (intermediate link rates capabilities,
> +              * ilr_cap): yes/no
> +              * kernel driver disallow_edp_enter_psr (dis_psr): no
> +              */
> +
>               /* Init only if display supports ilr link settings */
>               test_init(data, output);
>
> +             /* eDP enter power saving mode within test_init
> +              * drv_support_psr: yes; ilr_cap: no; dis_psr: no
> +              */
> +
>               /* Disable eDP PSR to avoid timeout when reading CRC */
>               igt_amd_disallow_edp_enter_psr(data->drm_fd, output-
> >name, true);
>
> +             /* drv_support_psr: yes; ilr_cap: no; dis_psr: yes */
>               mode = igt_output_get_mode(output);
>               igt_assert(mode);
>
> @@ -229,8 +234,30 @@ static void test_flow(data_t *data, enum sub_test
> option)
>                                     mode->vdisplay,
> DRM_FORMAT_XRGB8888,
>                                     0, &data->fb);
>               igt_plane_set_fb(data->primary, &data->fb);
> +
> +             /* drv_support_psr: yes; ilr_cap: no; dis_psr: yes
> +              * commit stream. eDP exit power saving mode.
> +              */
>               igt_display_commit_atomic(&data->display,
> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>
> +             /* drv_support_psr: no; ilr_cap: yes; dis_psr: yes.
> +              * With dis_psr yes, drm kernel driver
> +              * disable psr, psr_en is set to no.
> +              */
> +
> +             /* igt_amd_output_has_ilr_setting only checks if debugfs
> +              * exist. ilr settings could be all 0s -- not supported.
> +              * IGT needs to check if ilr settings values are supported.
> +              * Supported_ilr is read from DPCD registers. Make sure
> +              * eDP exiting power saving mode before reading
> supported_ilr.
> +              */
> +             igt_amd_read_ilr_setting(data->drm_fd, output->name,
> + data-
> >supported_ilr);
> +             if (data->supported_ilr[0] == 0) {
> +                     /* Enable PSR after reading eDP Rx CRC */
> +                     igt_amd_disallow_edp_enter_psr(data->drm_fd,
> output->name, false);

Should we also switch dpms off->on to have drv_support_psr become 'yes'?
What about we move this checking just right after test_init() and force DPMS on Before reading ilr capabilities? Then we can return quickly and don't have to touch dis_psr.

[Hersen] Move if (data->supported_ilr[0] == 0) { continue before test_init.

> +                     continue;
> +             }
> +
>               /* Collect info of Reported Lane Count & ILR */
>               igt_amd_read_link_settings(data->drm_fd, output->name,
> data->lane_count,
>                                          data->link_rate, data-
> >link_spread_spectrum); @@ -247,18 +274,38 @@ static void
> test_flow(data_t *data, enum sub_test option)
>                               break;
>               }
>
> +             /* drv_support_psr: no; ilr_cap: yes; dis_psr: yes */
> +             kmstest_set_connector_dpms(data->drm_fd,
> +                     output->config.connector, DRM_MODE_DPMS_OFF);
> +
> +             /* eDP enter power saving mode.
> +              * drv_support_psr: no; ilr_cap: no; dis_psr: yes.
> +              */
> +
> +             /* Enable PSR after reading eDP Rx CRC */
> +             igt_amd_disallow_edp_enter_psr(data->drm_fd, output-
> >name, false);
> +
> +             /* drv_support_psr: no; ilr_cap: yes: dis_psr: no */
> +
> +             /* eDP exit power saving mode and setup psr */
> +             kmstest_set_connector_dpms(data->drm_fd,
> +                     output->config.connector, DRM_MODE_DPMS_ON);
> +
> +             /* drv_support_psr: yes; ilr_cap: yes: dis_psr: no */
> +
>               /* Reset preferred link settings*/
>               memset(data->supported_ilr, 0, sizeof(data->supported_ilr));
>               igt_amd_write_ilr_setting(data->drm_fd, output->name, 0,
> 0);
>
> +             /* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
> +
> +             /* commit 0 stream. eDP enter power saving mode */
>               igt_remove_fb(data->drm_fd, &data->fb);
>
> -             test_fini(data);
> +             /* drv_support_psr: yes; ilr_cap: no; dis_psr: no */
>
> -             /* Enable eDP PSR */
> -             igt_amd_disallow_edp_enter_psr(data->drm_fd, output-
> >name, false);
> +             test_fini(data);
>       }
> -
>  }
>
>  igt_main
> --
> 2.25.1



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

* [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test
@ 2024-04-02 15:20 Hersen Wu
  2024-04-03  8:42 ` Lin, Wayne
  0 siblings, 1 reply; 11+ messages in thread
From: Hersen Wu @ 2024-04-02 15:20 UTC (permalink / raw)
  To: igt-dev, rodrigo.siqueira, aurabindo.pillai, alex.hung,
	hamza.mahfooz, sunpeng.li, wayne.lin
  Cc: markyacoub, Hersen Wu

From: Hersen Wu <Hersenxs.Wu@amd.com>

At end of test, with disallow_edp_enter_psr = 0, run DPMS off, on
for eDP. This will trigger DRM kernel driver enable eDP PSR.

Signed-off-by: Hersen Wu <Hersenxs.Wu@amd.com>
---
 lib/igt_amd.c          |  5 ---
 tests/amdgpu/amd_ilr.c | 84 ++++++++++++++++++++++++++++++++++--------
 2 files changed, 69 insertions(+), 20 deletions(-)

diff --git a/lib/igt_amd.c b/lib/igt_amd.c
index c0c4dfc67..149af5151 100644
--- a/lib/igt_amd.c
+++ b/lib/igt_amd.c
@@ -1185,11 +1185,6 @@ void igt_amd_disallow_edp_enter_psr(int drm_fd, char *connector_name, bool enabl
 	const char *allow_edp_psr = "1";
 	const char *dis_allow_edp_psr = "0";
 
-	/* if current psr is not enabled, skip this debugfs */
-	if (!igt_amd_psr_support_drv(drm_fd, connector_name, PSR_MODE_1) &&
-		!igt_amd_psr_support_drv(drm_fd, connector_name, PSR_MODE_2))
-		return;
-
 	fd = igt_debugfs_connector_dir(drm_fd, connector_name, O_RDONLY);
 	igt_assert(fd >= 0);
 	ret = openat(fd, DEBUGFS_DISALLOW_EDP_ENTER_PSR, O_WRONLY);
diff --git a/tests/amdgpu/amd_ilr.c b/tests/amdgpu/amd_ilr.c
index 46ad6f60a..b09980a15 100644
--- a/tests/amdgpu/amd_ilr.c
+++ b/tests/amdgpu/amd_ilr.c
@@ -205,21 +205,22 @@ static void test_flow(data_t *data, enum sub_test option)
 			continue;
 		}
 
-		/* igt_amd_output_has_ilr_setting only checks if debugfs
-		 * exist. ilr settings could be all 0s -- not supported.
-		 * IGT needs to check if ilr settings values are supported.
+		/* states under /sys/kernel/debug/dri/0/eDP-1:
+		 * psr_capability.driver_support (drv_support_psr): yes
+		 * ilr_setting (intermediate link rates capabilities,
+		 * ilr_cap): yes/no
+		 * kernel driver disallow_edp_enter_psr (dis_psr): no
 		 */
-		igt_amd_read_ilr_setting(data->drm_fd, output->name, data->supported_ilr);
-		if (data->supported_ilr[0] == 0)
-			continue;
-
-		igt_info("Testing on output: %s\n", output->name);
 
-		/* Init only if display supports ilr link settings */
+		/* Init only eDP */
 		test_init(data, output);
 
-		/* Disable eDP PSR to avoid timeout when reading CRC */
-		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, true);
+		/* set_all_output_pipe_to_none: no pipe is enabled.
+		 * DPMS on/off will not take effect until
+		 * next igt_display_commit_atomic.
+		 * eDP enter power saving mode within test_init
+		 * drv_support_psr: yes; ilr_cap: no; dis_psr: no
+		 */
 
 		mode = igt_output_get_mode(output);
 		igt_assert(mode);
@@ -229,7 +230,44 @@ static void test_flow(data_t *data, enum sub_test option)
 				      mode->vdisplay, DRM_FORMAT_XRGB8888,
 				      0, &data->fb);
 		igt_plane_set_fb(data->primary, &data->fb);
+
+		/* drv_support_psr: yes; ilr_cap: no; dis_psr: no
+		 * commit stream. eDP exit power saving mode.
+		 */
 		igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		/* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
+
+		/* igt_amd_output_has_ilr_setting only checks if debugfs
+		 * exist. ilr settings could be all 0s -- not supported.
+		 * IGT needs to check if ilr settings values are supported.
+		 * Supported_ilr is read from DPCD registers. Make sure
+		 * eDP exiting power saving mode before reading supported_ilr.
+		 * This check will let test be skipped for non-ilr eDP.
+		 */
+		igt_amd_read_ilr_setting(data->drm_fd, output->name, data->supported_ilr);
+		if (data->supported_ilr[0] == 0)
+			continue;
+
+		igt_info("Testing on output: %s\n", output->name);
+
+		/* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_OFF);
+		/* eDP enter power saving mode.
+		 * drv_support_psr: yes; ilr_cap: no; dis_psr: no.
+		 */
+
+		/* Disable eDP PSR to avoid timeout when reading CRC */
+		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, true);
+		/* drv_support_psr: yes; ilr_cap: no: dis_psr: yes */
+
+		/* eDP exit power saving mode and setup psr */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_ON);
+		/* drv_support_psr: no; ilr_cap: yes: dis_psr: yes
+		 * With dis_psr yes, drm kernel driver
+		 * disable psr, psr_en is set to no.
+		 */
 
 		/* Collect info of Reported Lane Count & ILR */
 		igt_amd_read_link_settings(data->drm_fd, output->name, data->lane_count,
@@ -247,18 +285,34 @@ static void test_flow(data_t *data, enum sub_test option)
 				break;
 		}
 
+		/* drv_support_psr: no; ilr_cap: yes; dis_psr: yes */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_OFF);
+		/* eDP enter power saving mode.
+		 * drv_support_psr: no; ilr_cap: no; dis_psr: yes.
+		 */
+
+		/* Enable PSR after reading eDP Rx CRC */
+		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, false);
+		/* drv_support_psr: no; ilr_cap: no: dis_psr: no */
+
+		/* eDP exit power saving mode and setup psr */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_ON);
+		/* drv_support_psr: yes; ilr_cap: yes: dis_psr: no */
+
 		/* Reset preferred link settings*/
 		memset(data->supported_ilr, 0, sizeof(data->supported_ilr));
 		igt_amd_write_ilr_setting(data->drm_fd, output->name, 0, 0);
+		/* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
 
+		/* commit 0 stream. eDP enter power saving mode */
 		igt_remove_fb(data->drm_fd, &data->fb);
+		/* drv_support_psr: yes; ilr_cap: no; dis_psr: no */
 
 		test_fini(data);
-
-		/* Enable eDP PSR */
-		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, false);
+		/* drv_support_psr: yes; ilr_cap: no; dis_psr: no */
 	}
-
 }
 
 igt_main
-- 
2.25.1


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

* RE: [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test
  2024-04-02 15:20 Hersen Wu
@ 2024-04-03  8:42 ` Lin, Wayne
  0 siblings, 0 replies; 11+ messages in thread
From: Lin, Wayne @ 2024-04-03  8:42 UTC (permalink / raw)
  To: Wu, Hersen, igt-dev@lists.freedesktop.org, Siqueira, Rodrigo,
	Pillai, Aurabindo, Hung, Alex, Mahfooz, Hamza, Li, Sun peng (Leo)
  Cc: markyacoub@google.com, Wu, Hersen

[Public]

Hi Hersen,

It lgtm. Feel free to add
Reviewed-by: Wayne Lin <wayne.lin@amd.com>

Regards,
Wayne

> -----Original Message-----
> From: Hersen Wu <hersenxs.wu@amd.com>
> Sent: Tuesday, April 2, 2024 11:21 PM
> To: igt-dev@lists.freedesktop.org; Siqueira, Rodrigo
> <Rodrigo.Siqueira@amd.com>; Pillai, Aurabindo
> <Aurabindo.Pillai@amd.com>; Hung, Alex <Alex.Hung@amd.com>; Mahfooz,
> Hamza <Hamza.Mahfooz@amd.com>; Li, Sun peng (Leo)
> <Sunpeng.Li@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>
> Cc: markyacoub@google.com; Wu, Hersen <hersenxs.wu@amd.com>
> Subject: [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled
> after test
>
> From: Hersen Wu <Hersenxs.Wu@amd.com>
>
> At end of test, with disallow_edp_enter_psr = 0, run DPMS off, on for eDP. This
> will trigger DRM kernel driver enable eDP PSR.
>
> Signed-off-by: Hersen Wu <Hersenxs.Wu@amd.com>
> ---
>  lib/igt_amd.c          |  5 ---
>  tests/amdgpu/amd_ilr.c | 84 ++++++++++++++++++++++++++++++++++---
> -----
>  2 files changed, 69 insertions(+), 20 deletions(-)
>
> diff --git a/lib/igt_amd.c b/lib/igt_amd.c index c0c4dfc67..149af5151 100644
> --- a/lib/igt_amd.c
> +++ b/lib/igt_amd.c
> @@ -1185,11 +1185,6 @@ void igt_amd_disallow_edp_enter_psr(int
> drm_fd, char *connector_name, bool enabl
>       const char *allow_edp_psr = "1";
>       const char *dis_allow_edp_psr = "0";
>
> -     /* if current psr is not enabled, skip this debugfs */
> -     if (!igt_amd_psr_support_drv(drm_fd, connector_name,
> PSR_MODE_1) &&
> -             !igt_amd_psr_support_drv(drm_fd, connector_name,
> PSR_MODE_2))
> -             return;
> -
>       fd = igt_debugfs_connector_dir(drm_fd, connector_name,
> O_RDONLY);
>       igt_assert(fd >= 0);
>       ret = openat(fd, DEBUGFS_DISALLOW_EDP_ENTER_PSR, O_WRONLY);
> diff --git a/tests/amdgpu/amd_ilr.c b/tests/amdgpu/amd_ilr.c index
> 46ad6f60a..b09980a15 100644
> --- a/tests/amdgpu/amd_ilr.c
> +++ b/tests/amdgpu/amd_ilr.c
> @@ -205,21 +205,22 @@ static void test_flow(data_t *data, enum sub_test
> option)
>                       continue;
>               }
>
> -             /* igt_amd_output_has_ilr_setting only checks if debugfs
> -              * exist. ilr settings could be all 0s -- not supported.
> -              * IGT needs to check if ilr settings values are supported.
> +             /* states under /sys/kernel/debug/dri/0/eDP-1:
> +              * psr_capability.driver_support (drv_support_psr): yes
> +              * ilr_setting (intermediate link rates capabilities,
> +              * ilr_cap): yes/no
> +              * kernel driver disallow_edp_enter_psr (dis_psr): no
>                */
> -             igt_amd_read_ilr_setting(data->drm_fd, output->name, data-
> >supported_ilr);
> -             if (data->supported_ilr[0] == 0)
> -                     continue;
> -
> -             igt_info("Testing on output: %s\n", output->name);
>
> -             /* Init only if display supports ilr link settings */
> +             /* Init only eDP */
>               test_init(data, output);
>
> -             /* Disable eDP PSR to avoid timeout when reading CRC */
> -             igt_amd_disallow_edp_enter_psr(data->drm_fd, output-
> >name, true);
> +             /* set_all_output_pipe_to_none: no pipe is enabled.
> +              * DPMS on/off will not take effect until
> +              * next igt_display_commit_atomic.
> +              * eDP enter power saving mode within test_init
> +              * drv_support_psr: yes; ilr_cap: no; dis_psr: no
> +              */
>
>               mode = igt_output_get_mode(output);
>               igt_assert(mode);
> @@ -229,7 +230,44 @@ static void test_flow(data_t *data, enum sub_test
> option)
>                                     mode->vdisplay,
> DRM_FORMAT_XRGB8888,
>                                     0, &data->fb);
>               igt_plane_set_fb(data->primary, &data->fb);
> +
> +             /* drv_support_psr: yes; ilr_cap: no; dis_psr: no
> +              * commit stream. eDP exit power saving mode.
> +              */
>               igt_display_commit_atomic(&data->display,
> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +             /* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
> +
> +             /* igt_amd_output_has_ilr_setting only checks if debugfs
> +              * exist. ilr settings could be all 0s -- not supported.
> +              * IGT needs to check if ilr settings values are supported.
> +              * Supported_ilr is read from DPCD registers. Make sure
> +              * eDP exiting power saving mode before reading
> supported_ilr.
> +              * This check will let test be skipped for non-ilr eDP.
> +              */
> +             igt_amd_read_ilr_setting(data->drm_fd, output->name, data-
> >supported_ilr);
> +             if (data->supported_ilr[0] == 0)
> +                     continue;
> +
> +             igt_info("Testing on output: %s\n", output->name);
> +
> +             /* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
> +             kmstest_set_connector_dpms(data->drm_fd,
> +                     output->config.connector, DRM_MODE_DPMS_OFF);
> +             /* eDP enter power saving mode.
> +              * drv_support_psr: yes; ilr_cap: no; dis_psr: no.
> +              */
> +
> +             /* Disable eDP PSR to avoid timeout when reading CRC */
> +             igt_amd_disallow_edp_enter_psr(data->drm_fd, output-
> >name, true);
> +             /* drv_support_psr: yes; ilr_cap: no: dis_psr: yes */
> +
> +             /* eDP exit power saving mode and setup psr */
> +             kmstest_set_connector_dpms(data->drm_fd,
> +                     output->config.connector, DRM_MODE_DPMS_ON);
> +             /* drv_support_psr: no; ilr_cap: yes: dis_psr: yes
> +              * With dis_psr yes, drm kernel driver
> +              * disable psr, psr_en is set to no.
> +              */
>
>               /* Collect info of Reported Lane Count & ILR */
>               igt_amd_read_link_settings(data->drm_fd, output->name,
> data->lane_count, @@ -247,18 +285,34 @@ static void test_flow(data_t
> *data, enum sub_test option)
>                               break;
>               }
>
> +             /* drv_support_psr: no; ilr_cap: yes; dis_psr: yes */
> +             kmstest_set_connector_dpms(data->drm_fd,
> +                     output->config.connector, DRM_MODE_DPMS_OFF);
> +             /* eDP enter power saving mode.
> +              * drv_support_psr: no; ilr_cap: no; dis_psr: yes.
> +              */
> +
> +             /* Enable PSR after reading eDP Rx CRC */
> +             igt_amd_disallow_edp_enter_psr(data->drm_fd, output-
> >name, false);
> +             /* drv_support_psr: no; ilr_cap: no: dis_psr: no */
> +
> +             /* eDP exit power saving mode and setup psr */
> +             kmstest_set_connector_dpms(data->drm_fd,
> +                     output->config.connector, DRM_MODE_DPMS_ON);
> +             /* drv_support_psr: yes; ilr_cap: yes: dis_psr: no */
> +
>               /* Reset preferred link settings*/
>               memset(data->supported_ilr, 0, sizeof(data->supported_ilr));
>               igt_amd_write_ilr_setting(data->drm_fd, output->name, 0,
> 0);
> +             /* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
>
> +             /* commit 0 stream. eDP enter power saving mode */
>               igt_remove_fb(data->drm_fd, &data->fb);
> +             /* drv_support_psr: yes; ilr_cap: no; dis_psr: no */
>
>               test_fini(data);
> -
> -             /* Enable eDP PSR */
> -             igt_amd_disallow_edp_enter_psr(data->drm_fd, output-
> >name, false);
> +             /* drv_support_psr: yes; ilr_cap: no; dis_psr: no */
>       }
> -
>  }
>
>  igt_main
> --
> 2.25.1


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

* [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test
@ 2024-04-03 14:28 Hersen Wu
  2024-04-03 18:57 ` Kamil Konieczny
  0 siblings, 1 reply; 11+ messages in thread
From: Hersen Wu @ 2024-04-03 14:28 UTC (permalink / raw)
  To: igt-dev, rodrigo.siqueira, aurabindo.pillai, alex.hung,
	hamza.mahfooz, sunpeng.li, wayne.lin
  Cc: markyacoub, Hersen Wu

From: Hersen Wu <Hersenxs.Wu@amd.com>

At end of test, with disallow_edp_enter_psr = 0, run DPMS off, on
for eDP. This will trigger DRM kernel driver enable eDP PSR.

Signed-off-by: Hersen Wu <Hersenxs.Wu@amd.com>
Reviewed-by: Wayne Lin <wayne.lin@amd.com>
---
 lib/igt_amd.c          |  5 ---
 tests/amdgpu/amd_ilr.c | 84 ++++++++++++++++++++++++++++++++++--------
 2 files changed, 69 insertions(+), 20 deletions(-)

diff --git a/lib/igt_amd.c b/lib/igt_amd.c
index c0c4dfc67..149af5151 100644
--- a/lib/igt_amd.c
+++ b/lib/igt_amd.c
@@ -1185,11 +1185,6 @@ void igt_amd_disallow_edp_enter_psr(int drm_fd, char *connector_name, bool enabl
 	const char *allow_edp_psr = "1";
 	const char *dis_allow_edp_psr = "0";
 
-	/* if current psr is not enabled, skip this debugfs */
-	if (!igt_amd_psr_support_drv(drm_fd, connector_name, PSR_MODE_1) &&
-		!igt_amd_psr_support_drv(drm_fd, connector_name, PSR_MODE_2))
-		return;
-
 	fd = igt_debugfs_connector_dir(drm_fd, connector_name, O_RDONLY);
 	igt_assert(fd >= 0);
 	ret = openat(fd, DEBUGFS_DISALLOW_EDP_ENTER_PSR, O_WRONLY);
diff --git a/tests/amdgpu/amd_ilr.c b/tests/amdgpu/amd_ilr.c
index 46ad6f60a..b09980a15 100644
--- a/tests/amdgpu/amd_ilr.c
+++ b/tests/amdgpu/amd_ilr.c
@@ -205,21 +205,22 @@ static void test_flow(data_t *data, enum sub_test option)
 			continue;
 		}
 
-		/* igt_amd_output_has_ilr_setting only checks if debugfs
-		 * exist. ilr settings could be all 0s -- not supported.
-		 * IGT needs to check if ilr settings values are supported.
+		/* states under /sys/kernel/debug/dri/0/eDP-1:
+		 * psr_capability.driver_support (drv_support_psr): yes
+		 * ilr_setting (intermediate link rates capabilities,
+		 * ilr_cap): yes/no
+		 * kernel driver disallow_edp_enter_psr (dis_psr): no
 		 */
-		igt_amd_read_ilr_setting(data->drm_fd, output->name, data->supported_ilr);
-		if (data->supported_ilr[0] == 0)
-			continue;
-
-		igt_info("Testing on output: %s\n", output->name);
 
-		/* Init only if display supports ilr link settings */
+		/* Init only eDP */
 		test_init(data, output);
 
-		/* Disable eDP PSR to avoid timeout when reading CRC */
-		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, true);
+		/* set_all_output_pipe_to_none: no pipe is enabled.
+		 * DPMS on/off will not take effect until
+		 * next igt_display_commit_atomic.
+		 * eDP enter power saving mode within test_init
+		 * drv_support_psr: yes; ilr_cap: no; dis_psr: no
+		 */
 
 		mode = igt_output_get_mode(output);
 		igt_assert(mode);
@@ -229,7 +230,44 @@ static void test_flow(data_t *data, enum sub_test option)
 				      mode->vdisplay, DRM_FORMAT_XRGB8888,
 				      0, &data->fb);
 		igt_plane_set_fb(data->primary, &data->fb);
+
+		/* drv_support_psr: yes; ilr_cap: no; dis_psr: no
+		 * commit stream. eDP exit power saving mode.
+		 */
 		igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		/* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
+
+		/* igt_amd_output_has_ilr_setting only checks if debugfs
+		 * exist. ilr settings could be all 0s -- not supported.
+		 * IGT needs to check if ilr settings values are supported.
+		 * Supported_ilr is read from DPCD registers. Make sure
+		 * eDP exiting power saving mode before reading supported_ilr.
+		 * This check will let test be skipped for non-ilr eDP.
+		 */
+		igt_amd_read_ilr_setting(data->drm_fd, output->name, data->supported_ilr);
+		if (data->supported_ilr[0] == 0)
+			continue;
+
+		igt_info("Testing on output: %s\n", output->name);
+
+		/* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_OFF);
+		/* eDP enter power saving mode.
+		 * drv_support_psr: yes; ilr_cap: no; dis_psr: no.
+		 */
+
+		/* Disable eDP PSR to avoid timeout when reading CRC */
+		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, true);
+		/* drv_support_psr: yes; ilr_cap: no: dis_psr: yes */
+
+		/* eDP exit power saving mode and setup psr */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_ON);
+		/* drv_support_psr: no; ilr_cap: yes: dis_psr: yes
+		 * With dis_psr yes, drm kernel driver
+		 * disable psr, psr_en is set to no.
+		 */
 
 		/* Collect info of Reported Lane Count & ILR */
 		igt_amd_read_link_settings(data->drm_fd, output->name, data->lane_count,
@@ -247,18 +285,34 @@ static void test_flow(data_t *data, enum sub_test option)
 				break;
 		}
 
+		/* drv_support_psr: no; ilr_cap: yes; dis_psr: yes */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_OFF);
+		/* eDP enter power saving mode.
+		 * drv_support_psr: no; ilr_cap: no; dis_psr: yes.
+		 */
+
+		/* Enable PSR after reading eDP Rx CRC */
+		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, false);
+		/* drv_support_psr: no; ilr_cap: no: dis_psr: no */
+
+		/* eDP exit power saving mode and setup psr */
+		kmstest_set_connector_dpms(data->drm_fd,
+			output->config.connector, DRM_MODE_DPMS_ON);
+		/* drv_support_psr: yes; ilr_cap: yes: dis_psr: no */
+
 		/* Reset preferred link settings*/
 		memset(data->supported_ilr, 0, sizeof(data->supported_ilr));
 		igt_amd_write_ilr_setting(data->drm_fd, output->name, 0, 0);
+		/* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
 
+		/* commit 0 stream. eDP enter power saving mode */
 		igt_remove_fb(data->drm_fd, &data->fb);
+		/* drv_support_psr: yes; ilr_cap: no; dis_psr: no */
 
 		test_fini(data);
-
-		/* Enable eDP PSR */
-		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, false);
+		/* drv_support_psr: yes; ilr_cap: no; dis_psr: no */
 	}
-
 }
 
 igt_main
-- 
2.25.1


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

* Re: [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test
  2024-04-03 14:28 Hersen Wu
@ 2024-04-03 18:57 ` Kamil Konieczny
  0 siblings, 0 replies; 11+ messages in thread
From: Kamil Konieczny @ 2024-04-03 18:57 UTC (permalink / raw)
  To: igt-dev
  Cc: Hersen Wu, rodrigo.siqueira, aurabindo.pillai, alex.hung,
	hamza.mahfooz, sunpeng.li, wayne.lin, markyacoub

Hi Hersen,
On 2024-04-03 at 10:28:30 -0400, Hersen Wu wrote:
> From: Hersen Wu <Hersenxs.Wu@amd.com>
> 
> At end of test, with disallow_edp_enter_psr = 0, run DPMS off, on
> for eDP. This will trigger DRM kernel driver enable eDP PSR.
> 
> Signed-off-by: Hersen Wu <Hersenxs.Wu@amd.com>
> Reviewed-by: Wayne Lin <wayne.lin@amd.com>

You do not need to resend with only r-b added, it can be
applied during merge.

Regards,
Kamil

> ---
>  lib/igt_amd.c          |  5 ---
>  tests/amdgpu/amd_ilr.c | 84 ++++++++++++++++++++++++++++++++++--------
>  2 files changed, 69 insertions(+), 20 deletions(-)
> 
> diff --git a/lib/igt_amd.c b/lib/igt_amd.c
> index c0c4dfc67..149af5151 100644
> --- a/lib/igt_amd.c
> +++ b/lib/igt_amd.c
> @@ -1185,11 +1185,6 @@ void igt_amd_disallow_edp_enter_psr(int drm_fd, char *connector_name, bool enabl
>  	const char *allow_edp_psr = "1";
>  	const char *dis_allow_edp_psr = "0";
>  
> -	/* if current psr is not enabled, skip this debugfs */
> -	if (!igt_amd_psr_support_drv(drm_fd, connector_name, PSR_MODE_1) &&
> -		!igt_amd_psr_support_drv(drm_fd, connector_name, PSR_MODE_2))
> -		return;
> -
>  	fd = igt_debugfs_connector_dir(drm_fd, connector_name, O_RDONLY);
>  	igt_assert(fd >= 0);
>  	ret = openat(fd, DEBUGFS_DISALLOW_EDP_ENTER_PSR, O_WRONLY);
> diff --git a/tests/amdgpu/amd_ilr.c b/tests/amdgpu/amd_ilr.c
> index 46ad6f60a..b09980a15 100644
> --- a/tests/amdgpu/amd_ilr.c
> +++ b/tests/amdgpu/amd_ilr.c
> @@ -205,21 +205,22 @@ static void test_flow(data_t *data, enum sub_test option)
>  			continue;
>  		}
>  
> -		/* igt_amd_output_has_ilr_setting only checks if debugfs
> -		 * exist. ilr settings could be all 0s -- not supported.
> -		 * IGT needs to check if ilr settings values are supported.
> +		/* states under /sys/kernel/debug/dri/0/eDP-1:
> +		 * psr_capability.driver_support (drv_support_psr): yes
> +		 * ilr_setting (intermediate link rates capabilities,
> +		 * ilr_cap): yes/no
> +		 * kernel driver disallow_edp_enter_psr (dis_psr): no
>  		 */
> -		igt_amd_read_ilr_setting(data->drm_fd, output->name, data->supported_ilr);
> -		if (data->supported_ilr[0] == 0)
> -			continue;
> -
> -		igt_info("Testing on output: %s\n", output->name);
>  
> -		/* Init only if display supports ilr link settings */
> +		/* Init only eDP */
>  		test_init(data, output);
>  
> -		/* Disable eDP PSR to avoid timeout when reading CRC */
> -		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, true);
> +		/* set_all_output_pipe_to_none: no pipe is enabled.
> +		 * DPMS on/off will not take effect until
> +		 * next igt_display_commit_atomic.
> +		 * eDP enter power saving mode within test_init
> +		 * drv_support_psr: yes; ilr_cap: no; dis_psr: no
> +		 */
>  
>  		mode = igt_output_get_mode(output);
>  		igt_assert(mode);
> @@ -229,7 +230,44 @@ static void test_flow(data_t *data, enum sub_test option)
>  				      mode->vdisplay, DRM_FORMAT_XRGB8888,
>  				      0, &data->fb);
>  		igt_plane_set_fb(data->primary, &data->fb);
> +
> +		/* drv_support_psr: yes; ilr_cap: no; dis_psr: no
> +		 * commit stream. eDP exit power saving mode.
> +		 */
>  		igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +		/* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
> +
> +		/* igt_amd_output_has_ilr_setting only checks if debugfs
> +		 * exist. ilr settings could be all 0s -- not supported.
> +		 * IGT needs to check if ilr settings values are supported.
> +		 * Supported_ilr is read from DPCD registers. Make sure
> +		 * eDP exiting power saving mode before reading supported_ilr.
> +		 * This check will let test be skipped for non-ilr eDP.
> +		 */
> +		igt_amd_read_ilr_setting(data->drm_fd, output->name, data->supported_ilr);
> +		if (data->supported_ilr[0] == 0)
> +			continue;
> +
> +		igt_info("Testing on output: %s\n", output->name);
> +
> +		/* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
> +		kmstest_set_connector_dpms(data->drm_fd,
> +			output->config.connector, DRM_MODE_DPMS_OFF);
> +		/* eDP enter power saving mode.
> +		 * drv_support_psr: yes; ilr_cap: no; dis_psr: no.
> +		 */
> +
> +		/* Disable eDP PSR to avoid timeout when reading CRC */
> +		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, true);
> +		/* drv_support_psr: yes; ilr_cap: no: dis_psr: yes */
> +
> +		/* eDP exit power saving mode and setup psr */
> +		kmstest_set_connector_dpms(data->drm_fd,
> +			output->config.connector, DRM_MODE_DPMS_ON);
> +		/* drv_support_psr: no; ilr_cap: yes: dis_psr: yes
> +		 * With dis_psr yes, drm kernel driver
> +		 * disable psr, psr_en is set to no.
> +		 */
>  
>  		/* Collect info of Reported Lane Count & ILR */
>  		igt_amd_read_link_settings(data->drm_fd, output->name, data->lane_count,
> @@ -247,18 +285,34 @@ static void test_flow(data_t *data, enum sub_test option)
>  				break;
>  		}
>  
> +		/* drv_support_psr: no; ilr_cap: yes; dis_psr: yes */
> +		kmstest_set_connector_dpms(data->drm_fd,
> +			output->config.connector, DRM_MODE_DPMS_OFF);
> +		/* eDP enter power saving mode.
> +		 * drv_support_psr: no; ilr_cap: no; dis_psr: yes.
> +		 */
> +
> +		/* Enable PSR after reading eDP Rx CRC */
> +		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, false);
> +		/* drv_support_psr: no; ilr_cap: no: dis_psr: no */
> +
> +		/* eDP exit power saving mode and setup psr */
> +		kmstest_set_connector_dpms(data->drm_fd,
> +			output->config.connector, DRM_MODE_DPMS_ON);
> +		/* drv_support_psr: yes; ilr_cap: yes: dis_psr: no */
> +
>  		/* Reset preferred link settings*/
>  		memset(data->supported_ilr, 0, sizeof(data->supported_ilr));
>  		igt_amd_write_ilr_setting(data->drm_fd, output->name, 0, 0);
> +		/* drv_support_psr: yes; ilr_cap: yes; dis_psr: no */
>  
> +		/* commit 0 stream. eDP enter power saving mode */
>  		igt_remove_fb(data->drm_fd, &data->fb);
> +		/* drv_support_psr: yes; ilr_cap: no; dis_psr: no */
>  
>  		test_fini(data);
> -
> -		/* Enable eDP PSR */
> -		igt_amd_disallow_edp_enter_psr(data->drm_fd, output->name, false);
> +		/* drv_support_psr: yes; ilr_cap: no; dis_psr: no */
>  	}
> -
>  }
>  
>  igt_main
> -- 
> 2.25.1
> 

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

end of thread, other threads:[~2024-04-03 18:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-25 13:19 [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test Hersen Wu
2024-03-25 14:03 ` ✓ CI.xeBAT: success for tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test (rev3) Patchwork
2024-03-25 14:11 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-03-28  3:58 ` [PATCH] [i-g-t] tests/amdgpu/amd_ilr: Fix eDP PSR not be re-enabled after test Lin, Wayne
2024-04-01 23:31   ` Wu, Hersen
  -- strict thread matches above, loose matches on Subject: below --
2024-04-03 14:28 Hersen Wu
2024-04-03 18:57 ` Kamil Konieczny
2024-04-02 15:20 Hersen Wu
2024-04-03  8:42 ` Lin, Wayne
2024-03-25 12:08 Hersen Wu
2024-03-19  1:17 Hersen Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox