summaryrefslogtreecommitdiff
path: root/lib/igt_aux.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/igt_aux.c')
-rw-r--r--lib/igt_aux.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index ebee119c..7d35666e 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -59,6 +59,7 @@
#include "intel_reg.h"
#include "ioctl_wrappers.h"
#include "igt_kms.h"
+#include "igt_pm.h"
/**
* SECTION:igt_aux
@@ -544,19 +545,7 @@ bool igt_setup_runtime_pm(void)
if (pm_status_fd >= 0)
return true;
- /* The Audio driver can get runtime PM references, so we need to make
- * sure its runtime PM is enabled, so it can release the refs and
- * actually enable us to runtime suspend. */
- fd = open("/sys/module/snd_hda_intel/parameters/power_save", O_WRONLY);
- if (fd >= 0) {
- igt_assert(write(fd, "1\n", 2) == 2);
- close(fd);
- }
- fd = open("/sys/bus/pci/devices/0000:00:03.0/power/control", O_WRONLY);
- if (fd >= 0) {
- igt_assert(write(fd, "auto\n", 5) == 5);
- close(fd);
- }
+ igt_pm_enable_audio_runtime_pm();
/* Our implementation uses autosuspend. Try to set it to 0ms so the test
* suite goes faster and we have a higher probability of triggering race