diff options
author | José Roberto de Souza <jose.souza@intel.com> | 2020-04-08 13:19:25 -0700 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2020-04-29 17:00:38 -0700 |
commit | faab65ff9bfa28d18c23e6f69d30e133b0acd767 (patch) | |
tree | ad7b9a2d3ce15fad8ff7d8e4980b7f3837a5f644 /lib | |
parent | dafeda5d7cef71f810d209ec52288b2a62ca5343 (diff) |
tests/kms_fbcon_fbt: Reduce execution time by not calling wait_until_enabled()
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 <jose.souza@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_psr.c | 10 | ||||
-rw-r--r-- | lib/igt_psr.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/igt_psr.c b/lib/igt_psr.c index 83ccacdd4..f92eff6ce 100644 --- a/lib/igt_psr.c +++ b/lib/igt_psr.c @@ -25,6 +25,16 @@ #include "igt_sysfs.h" #include <errno.h> +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 ca3857367..02ce760b2 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); |