[i-g-t,v2] tests/intel: Add tests to run suspend without display
Sujaritha Sundaresan
sujaritha.sundaresan at intel.com
Thu Mar 14 10:58:12 UTC 2024
Add tests to validate basic execution suspend/resume cycle
without display module to rule out display related issues
from the suspend/resume stack.
v2: Add normal reload cycle after running test (Anshuman)
Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan at intel.com>
---
tests/intel/xe_pm.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/tests/intel/xe_pm.c b/tests/intel/xe_pm.c
index fcbed6249..f6ef5d124 100644
--- a/tests/intel/xe_pm.c
+++ b/tests/intel/xe_pm.c
@@ -16,6 +16,7 @@
#include "igt.h"
#include "lib/igt_device.h"
+#include "lib/igt_kmod.h"
#include "lib/igt_pm.h"
#include "lib/igt_sysfs.h"
#include "lib/igt_syncobj.h"
@@ -246,6 +247,10 @@ static void close_fw_handle(int sig)
* Description: suspend/autoresume on %arg[1] state and exec after RPM
* Functionality: pm - %arg[1]
*
+ * SUBTEST: %s-without-display
+ * Description: suspend/autoresume on %arg[1] state without display
+ * Functionality: pm - %arg[1]
+ *
* arg[1]:
*
* @s2idle: s2idle
@@ -565,6 +570,7 @@ igt_main
struct drm_xe_engine_class_instance *hwe;
device_t device;
uint32_t d3cold_allowed;
+ const char *opts;
int sysfs_fd;
const struct s_state {
@@ -628,6 +634,34 @@ igt_main
NO_RPM);
}
+ igt_subtest_f("%s-without-display", s->name) {
+
+ if (!drmModeGetResources(device.fd_xe))
+ return;
+
+ xe_for_each_engine(device.fd_xe, hwe) {
+
+ igt_debug("Reload w/o display\n");
+
+ igt_kmsg(KMSG_INFO "Unloading Xe\n");
+ igt_assert_eq(igt_xe_driver_unload(),0);
+
+ igt_kmsg(KMSG_INFO "Re-loading Xe without display\n");
+ igt_assert_eq(igt_xe_driver_load("enable_display=0"),0);
+
+ test_exec(device, hwe, 1, 2, s->state,
+ NO_RPM);
+
+ igt_debug("Reload as normal\n");
+
+ igt_kmsg(KMSG_INFO "Unloading Xe\n");
+ igt_assert_eq(igt_xe_driver_unload(),0);
+
+ igt_kmsg(KMSG_INFO "Re-loading Xe\n");
+ igt_assert_eq(igt_xe_driver_load(opts),0);
+ }
+ }
+
for (const struct d_state *d = d_states; d->name; d++) {
igt_subtest_f("%s-%s-basic-exec", s->name, d->name) {
igt_assert(setup_d3(device, d->state));
--
2.25.1
More information about the igt-dev
mailing list