[Intel-gfx] [PATCH i-g-t 8/8] kms_psr_sink_crc: Add suspend/resume sub test.
Rodrigo Vivi
rodrigo.vivi at intel.com
Thu Nov 5 10:53:34 PST 2015
Also add a option to allow us to skip this test case in machines
where other suspend/resume issues would break the test exectution.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
tests/kms_psr_sink_crc.c | 38 +++++++++++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
index b2f88ea..e2ca988 100644
--- a/tests/kms_psr_sink_crc.c
+++ b/tests/kms_psr_sink_crc.c
@@ -31,6 +31,7 @@
#include "intel_bufmgr.h"
bool running_with_psr_disabled;
+bool no_suspend;
#define CRC_BLACK "000000000000"
@@ -530,6 +531,9 @@ static int opt_handler(int opt, int opt_index, void *data)
case 'n':
running_with_psr_disabled = true;
break;
+ case 's':
+ no_suspend = true;
+ break;
default:
igt_assert(0);
}
@@ -540,9 +544,11 @@ static int opt_handler(int opt, int opt_index, void *data)
int main(int argc, char *argv[])
{
const char *help_str =
- " --no-psr\tRun test without PSR to check the CRC test logic.";
+ " --no-psr\tRun test without PSR to check the CRC test logic."
+ " --no-suspend\tDon't run suspend resume test cases.";
static struct option long_options[] = {
{"no-psr", 0, 0, 'n'},
+ {"no-suspend", 0, 0, 's'},
{ 0, 0, 0, 0 }
};
data_t data = {};
@@ -626,6 +632,36 @@ int main(int argc, char *argv[])
test_cleanup(&data);
}
+ igt_subtest_f("suspend_psr_active") {
+
+ igt_skip_on(no_suspend);
+
+ data.test_plane = PRIMARY;
+ data.op = PAGE_FLIP;
+ setup_test_plane(&data);
+ igt_assert(wait_psr_entry(&data));
+
+ igt_system_suspend_autoresume();
+
+ run_test(&data);
+ test_cleanup(&data);
+ }
+
+ igt_subtest_f("suspend_psr_exit") {
+
+ igt_skip_on(no_suspend);
+
+ data.test_plane = CURSOR;
+ data.op = PLANE_ONOFF;
+ setup_test_plane(&data);
+
+ igt_system_suspend_autoresume();
+
+ igt_assert(wait_psr_entry(&data));
+ run_test(&data);
+ test_cleanup(&data);
+ }
+
igt_fixture {
drm_intel_bufmgr_destroy(data.bufmgr);
display_fini(&data);
--
2.4.3
More information about the Intel-gfx
mailing list