From faab65ff9bfa28d18c23e6f69d30e133b0acd767 Mon Sep 17 00:00:00 2001 From: José Roberto de Souza Date: Wed, 8 Apr 2020 13:19:25 -0700 Subject: tests/kms_fbcon_fbt: Reduce execution time by not calling wait_until_enabled() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After unset all CRTCs is expected that FBC and PSR is disabled, calling wait_until_enabled() will make it wait until timeout to it return false and pass the test. So instead lets implement is_disabled() hook, as the kmstest_unset_all_crtcs() is a synchronous call, the features will be already disabled after it, so no need to do any wait. Signed-off-by: José Roberto de Souza Reviewed-by: Imre Deak Signed-off-by: Lucas De Marchi --- lib/igt_psr.c | 10 ++++++++++ lib/igt_psr.h | 1 + 2 files changed, 11 insertions(+) (limited to 'lib') diff --git a/lib/igt_psr.c b/lib/igt_psr.c index 83ccacdd..f92eff6c 100644 --- a/lib/igt_psr.c +++ b/lib/igt_psr.c @@ -25,6 +25,16 @@ #include "igt_sysfs.h" #include +bool psr_disabled_check(int debugfs_fd) +{ + char buf[PSR_STATUS_MAX_LEN]; + + igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf, + sizeof(buf)); + + return strstr(buf, "PSR mode: disabled\n"); +} + static bool psr_active_check(int debugfs_fd, enum psr_mode mode) { char buf[PSR_STATUS_MAX_LEN]; diff --git a/lib/igt_psr.h b/lib/igt_psr.h index ca385736..02ce760b 100644 --- a/lib/igt_psr.h +++ b/lib/igt_psr.h @@ -35,6 +35,7 @@ enum psr_mode { PSR_MODE_2 }; +bool psr_disabled_check(int debugfs_fd); bool psr_wait_entry(int debugfs_fd, enum psr_mode mode); bool psr_wait_update(int debugfs_fd, enum psr_mode mode); bool psr_long_wait_update(int debugfs_fd, enum psr_mode mode); -- cgit v1.2.3