summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_psr.c7
-rw-r--r--lib/igt_psr.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index c2bae95b..355fe627 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -25,7 +25,7 @@
#include "igt_sysfs.h"
#include <errno.h>
-bool psr_active(int debugfs_fd, bool check_active)
+static bool psr_active(int debugfs_fd, bool check_active)
{
bool active;
char buf[512];
@@ -42,6 +42,11 @@ bool psr_wait_entry(int debugfs_fd)
return igt_wait(psr_active(debugfs_fd, true), 500, 1);
}
+bool psr_wait_exit(int debugfs_fd)
+{
+ return igt_wait(psr_active(debugfs_fd, false), 40, 10);
+}
+
static ssize_t psr_write(int debugfs_fd, const char *buf)
{
return igt_sysfs_write(debugfs_fd, "i915_edp_psr_debug", buf,
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index 7c846afb..b9693822 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -29,7 +29,7 @@
#include "igt_aux.h"
bool psr_wait_entry(int debugfs_fd);
-bool psr_active(int debugfs_fd, bool check_active);
+bool psr_wait_exit(int debugfs_fd);
bool psr_enable(int debugfs_fd);
bool psr_disable(int debugfs_fd);