[igt-dev] [PATCH i-g-t 5/6] tests/psr: Test PSR1 in kms_psr

Dhinakaran Pandiyan dhinakaran.pandiyan at intel.com
Wed Aug 29 21:57:12 UTC 2018


The tests we have work only with PSR1, but setting the module parameter
enable_psr enables PSR2 if the panel supports it. Make use of the newly
added debugfs toggle to enable only PSR1 when testing.

Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
---
 tests/kms_psr.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/kms_psr.c b/tests/kms_psr.c
index 3e64cf04..fcc04770 100644
--- a/tests/kms_psr.c
+++ b/tests/kms_psr.c
@@ -414,8 +414,9 @@ int main(int argc, char *argv[])
 		kmstest_set_vt_graphics_mode();
 		data.devid = intel_get_drm_devid(data.drm_fd);
 
-		igt_set_module_param_int("enable_psr", data.with_psr_disabled ?
-					 0 : 1);
+		if (!data.with_psr_disabled)
+			psr_enable(data.debugfs_fd);
+
 		igt_require_f(sink_support(&data),
 			      "Sink does not support PSR\n");
 
@@ -490,6 +491,9 @@ int main(int argc, char *argv[])
 	}
 
 	igt_fixture {
+		if (!data.with_psr_disabled)
+			psr_disable(data.debugfs_fd);
+
 		close(data.debugfs_fd);
 		drm_intel_bufmgr_destroy(data.bufmgr);
 		display_fini(&data);
-- 
2.14.1



More information about the igt-dev mailing list