[PATCH i-g-t v2 2/5] tests/intel/kms_psr*: Add psr_sink_error_check to PSR tests

Jouni Högander jouni.hogander at intel.com
Wed Sep 11 05:49:55 UTC 2024


Currently we are ignoring possible errors detected by the sink in our
PSR testcases. Fix this by add psr_sink_error_check to each of them.

v2: split kms_fbt and kms_pm_dc to separate patches

Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
 tests/intel/kms_psr.c             | 2 ++
 tests/intel/kms_psr2_sf.c         | 2 ++
 tests/intel/kms_psr2_su.c         | 2 ++
 tests/intel/kms_psr_stress_test.c | 1 +
 4 files changed, 7 insertions(+)

diff --git a/tests/intel/kms_psr.c b/tests/intel/kms_psr.c
index cf0ce4bb8..2badeeddd 100644
--- a/tests/intel/kms_psr.c
+++ b/tests/intel/kms_psr.c
@@ -650,6 +650,8 @@ static void test_cleanup(data_t *data)
 {
 	igt_plane_t *primary;
 
+	psr_sink_error_check(data->debugfs_fd, data->op_psr_mode, data->output);
+
 	igt_output_override_mode(data->output, NULL);
 
 	primary = igt_output_get_plane_type(data->output,
diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
index 03ff1cddb..a9be1a1ec 100644
--- a/tests/intel/kms_psr2_sf.c
+++ b/tests/intel/kms_psr2_sf.c
@@ -972,6 +972,8 @@ static void run(data_t *data)
 	default:
 		igt_assert(false);
 	}
+
+	psr_sink_error_check(data->debugfs_fd, data->psr_mode, data->output);
 }
 
 static void cleanup(data_t *data)
diff --git a/tests/intel/kms_psr2_su.c b/tests/intel/kms_psr2_su.c
index 437ee36f6..0099daf1d 100644
--- a/tests/intel/kms_psr2_su.c
+++ b/tests/intel/kms_psr2_su.c
@@ -273,6 +273,8 @@ static void run(data_t *data, igt_output_t *output)
 
 	igt_assert_f(result,
 		     "No matching selective update blocks read from debugfs\n");
+
+	psr_sink_error_check(data->debugfs_fd, PSR_MODE_2, output);
 }
 
 static void cleanup(data_t *data, igt_output_t *output)
diff --git a/tests/intel/kms_psr_stress_test.c b/tests/intel/kms_psr_stress_test.c
index d6e2340b8..73a6eb56d 100644
--- a/tests/intel/kms_psr_stress_test.c
+++ b/tests/intel/kms_psr_stress_test.c
@@ -344,6 +344,7 @@ static void run(data_t *data)
 
 	/* Check if after all this stress the PSR is still in the same state */
 	igt_assert(psr_get_mode(data->debugfs_fd, NULL) == data->initial_state);
+	psr_sink_error_check(data->debugfs_fd, data->initial_state, data->output);
 }
 
 igt_main
-- 
2.34.1



More information about the igt-dev mailing list