From 0209886b3d1a8da654cc61b104da19fdcbd6d779 Mon Sep 17 00:00:00 2001 From: Dhinakaran Pandiyan Date: Wed, 5 Sep 2018 14:15:58 -0700 Subject: tests/psr: Test PSR1 in kms_psr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: José Roberto de Souza --- tests/kms_psr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/kms_psr.c') 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); -- cgit v1.2.3