Unbinding the i915 driver on some Haswell platforms with Azalia audio
results in a kernel WARNING on "i915 raw-wakerefs=1 wakelocks=1 on
cleanup".  The issue can be worked around by manually enabling runtime
power management for the conflicting audio adapter.  Use that method
but also display a warning to preserve visibility of the issue.  Also
tag the workaround with a FIXME comment.

Signed-off-by: Janusz Krzysztofik <janusz.krzyszto...@linux.intel.com>
---
 tests/core_hotunplug.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
index 361d601af..a3d2a04ed 100644
--- a/tests/core_hotunplug.c
+++ b/tests/core_hotunplug.c
@@ -473,9 +473,23 @@ igt_main
                igt_skip_on_f(fd_drm < 0, "No known DRM device found\n");
 
                if (is_i915_device(fd_drm)) {
+                       uint32_t devid = intel_get_drm_devid(fd_drm);
+
                        gem_quiescent_gpu(fd_drm);
                        igt_skip_on_f(local_i915_healthcheck(fd_drm, "pre-"),
                                      "i915 device not healthy on test 
start\n");
+
+                       /**
+                        * FIXME: Unbinding the i915 driver on some Haswell
+                        * platforms with Azalia audio results in a kernel WARN
+                        * on "i915 raw-wakerefs=1 wakelocks=1 on cleanup".  The
+                        * below CI friendly user level workaround prevents the
+                        * warning from appearing.  Drop this hack as soon as
+                        * this is fixed in the kernel.
+                        */
+                       if (igt_warn_on_f((bool) IS_HASWELL(devid),
+                           "Manually enabling audio PM to work around a kernel 
WARN\n"))
+                               igt_pm_enable_audio_runtime_pm();
                }
 
                /* Make sure subtests always reopen the same device */
-- 
2.21.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to