summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/pm_rpm.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 65489bcd..c0212ed7 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -717,21 +717,23 @@ out:
return wait_for_suspended();
}
-static void restore_environment(void)
+static void teardown_environment(void)
{
+ close(msr_fd);
+ if (has_pc8)
+ close(pc8_status_fd);
+
+ igt_restore_runtime_pm();
+
igt_pm_restore_sata_link_power_management(pm_data);
free(pm_data);
-}
-static void teardown_environment(void)
-{
- restore_environment();
fini_mode_set_data(&ms_data);
+
close(debugfs);
- drmClose(drm_fd);
- close(msr_fd);
- if (has_pc8)
- close(pc8_status_fd);
+ close(drm_fd);
+
+ has_runtime_pm = false;
}
static void basic_subtest(void)